private function startAutoLoader() { require_once 'AutoLoader.php'; $auto_loader = new AutoLoader(); $auto_loader->addNamespace('sweb', $this->sWebPath); $auto_loader->addNamespace($this->pageNS, $this->pagePath); $auto_loader->register(); }
public final function _initialize() { $this->loader = new AutoLoader(); $this->loader->register(); // Register core namespace $this->loader->addNamespace('\\XDaRk', dirname(__FILE__)); $this->core = Core::getInstance($this); Core::$instanceNamespace = $GLOBALS[$this->name]['root_ns']; Core::$instanceBaseDir = $GLOBALS[$this->name]['dir']; Core::$instanceRootNSDir = $GLOBALS[$this->name]['dir'] . DIRECTORY_SEPARATOR . strtolower(Core::$instanceNamespace); // Register instance namespace, this is a necessary step $this->loader->addNamespace('\\' . Core::$instanceNamespace, Core::$instanceRootNSDir); Core::$instanceClasses = File::phpClassesInDir(Core::$instanceRootNSDir); Core::$classes = File::phpClassesInDir(dirname(__FILE__)); // Extenders $this->xdRegisterNameSpaces(); Hooks::registerHooks($this, $this->Hooks); }