コード例 #1
0
ファイル: Manager.php プロジェクト: apparat/object
 /**
  * Test whether an object resource exists
  *
  * @param RepositoryLocatorInterface $locator
  * @return boolean Object resource exists
  */
 public function objectResourceExists(RepositoryLocatorInterface $locator)
 {
     return $locator->getRepository()->getAdapterStrategy()->hasResource($locator->withExtension(getenv('OBJECT_RESOURCE_EXTENSION')));
 }
コード例 #2
0
 /**
  * Build an absolute repository resource locator
  *
  * @param RepositoryLocatorInterface $repositoryLocator Repository locator
  * @return string Absolute repository resource locator
  */
 public function getAbsoluteResourcePath(RepositoryLocatorInterface $repositoryLocator)
 {
     return $this->root . str_replace('/', DIRECTORY_SEPARATOR, $repositoryLocator->withExtension(getenv('OBJECT_RESOURCE_EXTENSION')));
 }