/** * Instantiate and return an object * * @param string $url Object URL (relative or absolute including the apparat base URL) * @param int $visibility Object visibility * @return ObjectInterface Object */ public static function load($url, $visibility = ObjectTypes::VISIBILITY_ALL) { // Instantiate the object URL /** @var ObjectUrl $objectUrl */ $objectUrl = Kernel::create(ObjectUrl::class, [$url, true]); // Instantiate the local object repository, load and return the object return Repository::instance($objectUrl->getRepositoryUrl())->loadObject($objectUrl, $visibility); }
/** * Instantiate and return an object repository * * @param string $url Repository URL (relative or absolute including the apparat base URL) * @return RepositoryFacade Repository facade * @api */ public static function instance($url) { return new static(Repository::instance($url)); }