Exemplo n.º 1
0
 /**
  * Load an object from this repository
  *
  * @param string $locator Object locator
  * @param int $visibility Object visibility
  * @return ApparatObjectInterface Object
  */
 public function loadObject($locator, $visibility = SelectorInterface::ALL)
 {
     /** @var LocatorInterface $objectLocator */
     $objectLocator = Kernel::create(RepositoryLocator::class, [$this->repository, $locator]);
     return ApparatObjectFactory::create($this->repository->loadObject($objectLocator, $visibility));
 }
Exemplo n.º 2
0
 /**
  * Instantiate and return an object
  *
  * @param string $url Object URL (relative or absolute including the apparat base URL)
  * @param int $visibility Object visibility
  * @return ApparatObjectInterface Apparat object
  * @api
  */
 public static function load($url, $visibility = ObjectTypes::VISIBILITY_ALL)
 {
     return ApparatObjectFactory::create(Object::load($url, $visibility));
 }