Example #1
0
 private function __construct($lang)
 {
     $this->conf = Config::run();
     $this->conf->loadFromFile(Config::getConfPath('lang'));
     if ($lang === null) {
         $this->lang = $this->conf->getField('default');
     }
     $this->loadFromFile($this->conf->getField('langPath'));
 }
Example #2
0
 public function init($conf)
 {
     $this->config = new Config();
     $this->config->loadFromFile(Config::getConfPath('router'));
     if ($this->config->getField('requestUri')) {
         $this->requestUri = $this->config->getField('requestUri');
     } else {
         $this->requestUri = $_SERVER['REQUEST_URI'];
     }
 }
Example #3
0
 public static function getAppTitle($title = null, $echo = false)
 {
     if ($title === null) {
         $config = Config::run();
         $config->loadFromFile(Config::getConfPath('application'));
         $title = $config->getField('name');
     }
     if ($echo) {
         echo $title;
     } else {
         return $title;
     }
 }
Example #4
0
 public function init($initConfig = null)
 {
     $this->config = new Config();
     $this->config->loadFromFile(Config::getConfPath('application'));
 }
Example #5
0
 public function __construct()
 {
     $this->config = Config::run();
     $this->config->loadFromFile(Config::getConfPath('db'));
     $this->connect($this->config->getField('host'), $this->config->getField('user'), $this->config->getField('password'));
 }
Example #6
0
 public function init($config = null)
 {
     $this->config = Config::run();
     $this->config->loadFromFile(Config::getConfPath('auth'));
 }
Example #7
0
 public function loadLoginPage()
 {
     $this->dom->addScript(Script::run(['name' => 'programs/Auth']));
     $this->view->loadTemplate('login', ['screenSrc' => $this->imgPath . $this->config->getField('screen'), 'userLogo' => $this->imgPath . $this->config->getField('userLogo')]);
 }
Example #8
0
 /**
  * @param $controllerName
  * @throws \Exception
  */
 public function initConfig($controllerName)
 {
     $this->config = new Config();
     $this->config->loadFromFile(Config::getConfPath('view'));
     $this->viewPath = $this->config->getField('viewPath') . $controllerName . DIRECTORY_SEPARATOR;
 }