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']; } }
/** * @param $view * @throws \Exception */ public function __construct($view) { $this->dom = Dom::run(); $this->imgPath = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . '/kernel/resources/img/splash/'; $this->config = Config::run(); $this->config->loadFromFile(Config::getConfPath('splash')); $this->logo = $this->config->getField('logo'); $this->view = $view; $this->view->initConfig('main'); }
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')); }
/** * @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; }