Puli\Repository\AbstractRepository::getVersions PHP Method

getVersions() public method

public getVersions ( $path )
    public function getVersions($path)
    {
        // Non-editable repositories always contain only one version of a resource
        try {
            return new VersionList($path, array($this->get($path)));
        } catch (ResourceNotFoundException $e) {
            throw NoVersionFoundException::forPath($path, $e);
        }
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function getVersions($path)
 {
     if (null === $this->changeStream) {
         return parent::getVersions($path);
     }
     return $this->changeStream->getVersions($path, $this);
 }