/** * Register autoloader. * @return void */ public function register() { $this->list = $this->getCache()->load($this->getKey(), callback($this, '_rebuildCallback')); if (isset($this->list[strtolower(__CLASS__)]) && class_exists('NNetteLoader', FALSE)) { NNetteLoader::getInstance()->unregister(); } parent::register(); }
function register() { $cache = $this->getCache(); $key = $this->getKey(); if (isset($cache[$key])) { $this->list = $cache[$key]; } else { $this->rebuild(); } if (isset($this->list[strtolower(__CLASS__)]) && class_exists('NNetteLoader', FALSE)) { NNetteLoader::getInstance()->unregister(); } parent::register(); }
/** * Register autoloader. * @return self */ public function register() { $this->classes = $this->getCache()->load($this->getKey(), new NCallback($this, '_rebuildCallback')); parent::register(); return $this; }