public function tryLoad($type) { if (!$this->initialized) { $this->initialize(); } parent::tryLoad($type); }
/** * @param string $presentersRoot from where to find presenters * @param IStorage $cacheStorage * @param RouteAnnotation $routeAnnotation */ public function __construct($presentersRoot, IStorage $cacheStorage, RouteAnnotation $routeAnnotation) { $loader = new RobotLoader(); $loader->addDirectory($presentersRoot); $loader->setCacheStorage($cacheStorage); $loader->tryLoad('Drahak\\Restful\\Application\\IResourcePresenter'); $this->loader = $loader; $this->cacheStorage = $cacheStorage; $this->routeAnnotation = $routeAnnotation; }