public function onRegister() { parent::onRegister(); // ----- $this->user = $this->get('user'); $this->request = $this->get('request'); }
public function onRegister() { parent::onRegister(); // ----- $this->data = (include ROOT_DIR . '/config/config.php'); $this->data['appSettings'] = $this->readAppSettings(); }
public function onRegister() { parent::onRegister(); // ----- $config = $this->get('config'); $connection = isset($config->data['appSettings']['installed']) && $config->data['appSettings']['installed'] ? $config->data['dbConnection'] : $config->data['dbConnectionRaw']; $this->db = new PDO($connection, $config->data['dbUser'], $config->data['dbPassword']); }
public function onRegister() { parent::onRegister(); // ----- $this->config = $this->get('config'); $this->logger = $this->get('logger'); $this->reconnect(); }
public function onRegister() { parent::onRegister(); // ----- $this->config = (include ROOT_DIR . '/config/firewall.php'); $this->user = $this->get('user'); $this->router = $this->get('router'); }
public function onRegister() { parent::onRegister(); // ----- $this->app = $this->getApp(); $this->user = $this->get('user'); $this->request = $this->get('request'); $this->env = $this->get('config')->data['env']; }
public function onRegister() { parent::onRegister(); // ----- $this->config = $this->get('config'); $this->logFilePath = ROOT_DIR . '/../' . $this->config->data['services']['logger']['file']; $this->logErrors = $this->config->data['services']['logger']['logErrors']; $this->logWarnings = $this->config->data['services']['logger']['logWarnings']; $this->logInfos = $this->config->data['services']['logger']['logInfos']; }
public function onRegister() { parent::onRegister(); // ----- $user = $this->get('auth')->getUser(); if (!empty($user)) { $this->id = $user['id']; $this->name = $user['name']; $this->roles = array_merge($user['roles'], array('GUEST')); } else { $this->id = null; $this->name = 'Guest'; $this->roles = array('GUEST'); } }
public function onRegister() { parent::onRegister(); // Find current environment $this->env = $this->getApp()->getEnvironment(); // Load configuration $this->configPath = ROOT_DIR . '/config/config' . (empty($this->env) ? '' : '_' . $this->env) . '.php'; $this->data = (include $this->configPath); // Load parameters $this->parametersPath = ROOT_DIR . '/config/parameters' . (empty($this->env) ? '' : '_' . $this->env) . '.php'; $this->parameters = (include $this->parametersPath); // Merge $this->data = Utils::arrayMergeRecursive($this->data, $this->parameters); // Load application settings $this->settingsPath = ROOT_DIR . '/config/' . $this->data['services']['configuration']['appSettingsFile']; $this->data['appSettings'] = $this->readAppSettings(); }
public function onRegister() { parent::onRegister(); // ----- $this->data = $this->getFileData(); }
public function onRegister() { parent::onRegister(); // ----- $this->validation = $this->get('validation'); }
public function onRegister() { parent::onRegister(); // ----- $this->reconnect(); }
public function onRegister() { parent::onRegister(); // ----- $this->session = $this->get('session'); }