Esempio n. 1
0
 /**
  * Require files of Controllers folder
  */
 protected static function controller($routes)
 {
     if ($routes) {
         if (Application::getCurrentModule() !== Config::get('panel.route') && !strpos(Application::getCurrentModule(), "&")) {
             Lang::addDictionary(Application::getCurrentModule(), "index");
             foreach (self::fetch("bundles/" . Application::getCurrentModule() . "/controllers") as $file) {
                 Connector::need($file);
             }
         } else {
             Lang::addDictionary(Config::get('panel.path'), "index", true);
             foreach (self::fetch(Application::$root . Config::get('panel.path') . "controllers") as $file) {
                 Connector::need($file);
             }
         }
     }
 }