Puli\Repository\Api\ChangeStream\VersionList::__construct PHP Метод

__construct() публичный Метод

Creates a new version list.
public __construct ( string $path, array $versions )
$path string The Puli path.
$versions array The versions of the resource, starting with the first.
    public function __construct($path, array $versions)
    {
        Assert::stringNotEmpty($path, 'The Puli path must be a non-empty string. Got: %s');
        Assert::allIsInstanceOf($versions, 'Puli\\Repository\\Api\\Resource\\PuliResource');
        Assert::greaterThanEq(count($versions), 1, 'Expected at least one version.');
        $this->path = $path;
        $this->versions = array_values($versions);
    }