private function __construct()
 {
     \Frame\Loader::registerAutoLoad();
     \Frame\Loader::registerNamespace('Frame', dirname(__FILE__) . DIRECTORY_SEPARATOR);
     $this->_config = \Frame\Config::getInstance();
     $this->_controller = \Frame\FrontController::getInstance();
 }
示例#2
0
 public function setConfigFolder($path)
 {
     if (!$path) {
         //TODO
         throw new \Exception('Invalid path');
     }
     $rPath = realpath($path);
     if ($rPath && is_dir($rPath) && is_readable($rPath)) {
         $this->configFolder = $rPath;
         if (is_array($this->appConfig['namespaces'])) {
             \Frame\Loader::registerNamespaces($this->appConfig['namespaces']);
         }
     } else {
         //TODO
         throw new \Exception('Invalid Config folder path');
     }
 }