Esempio n. 1
0
 public function __construct($request, $params, $files)
 {
     $this->request = $request;
     $this->params = $params;
     $this->files = $files;
     $this->applicationConfig = SettingsService::getInstance()->getValueFor("Application");
 }
Esempio n. 2
0
 public function __construct($getConfig = true, $customName = null)
 {
     if ($getConfig) {
         if ($customName == null) {
             $customName = get_called_class();
         }
         $this->config = SettingsService::getInstance()->getFrameworkConfig($customName);
     }
 }
Esempio n. 3
0
 public static function hi_framework($configFolders)
 {
     include_once __DIR__ . DIRECTORY_SEPARATOR . "phplibrary.php";
     SettingsService::getInstance()->addFolder($configFolders);
     RuntimeService::getInstance()->setFrameworkDirectory(__DIR__);
     $val = SettingsService::getInstance()->tryGetValueFor(array("Framework", "DebugMode"));
     if ($val === true) {
         error_reporting(E_ALL);
         ini_set('display_errors', 1);
     } else {
         error_reporting(0);
         ini_set('display_errors', 0);
     }
 }
Esempio n. 4
0
 public function __construct()
 {
     parent::__construct();
     $routes = SettingsService::getInstance()->getValueFor("Routes");
     foreach ($routes as $route) {
         $this->controllers[$route["Controller"]] = new ControllerModel($route["Url"], $route["Controller"]);
     }
     $menuInfo = $this->getConfig("Menus");
     foreach ($menuInfo as $menu) {
         foreach ($menu["Entries"] as $item) {
             if (isset($this->getControllers()[$item["Controller"]])) {
                 $this->menus[$menu["Name"]] = new IconMenuItem($item["Name"], $this->controllers[$item["Controller"]]->getUrl(), $item["Icon"]);
             } else {
                 LogHelper::getInstance()->logError("unknown controller used in menu: " . $item["Controller"]);
             }
         }
     }
 }