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')); }
/** * @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 __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')); }