Puli\Repository\Resource\Collection\ArrayResourceCollection::__construct PHP Méthode

__construct() public méthode

You can pass the resources that you want to initially store in the collection as argument.
public __construct ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources = [] )
$resources Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable The resources to store in the collection.
    public function __construct($resources = array())
    {
        $this->replace($resources);
    }