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')); }
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']; } }
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; } }
public function init($initConfig = null) { $this->config = new Config(); $this->config->loadFromFile(Config::getConfPath('application')); }
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')); }
public function init($config = null) { $this->config = Config::run(); $this->config->loadFromFile(Config::getConfPath('auth')); }
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')]); }
/** * @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; }