Exemple #1
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->user = $this->get('user');
     $this->request = $this->get('request');
 }
Exemple #2
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->data = (include ROOT_DIR . '/config/config.php');
     $this->data['appSettings'] = $this->readAppSettings();
 }
Exemple #3
0
 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']);
 }
Exemple #4
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->config = $this->get('config');
     $this->logger = $this->get('logger');
     $this->reconnect();
 }
Exemple #5
0
 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'];
 }
Exemple #7
0
 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'];
 }
Exemple #8
0
 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');
     }
 }
Exemple #9
0
 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();
 }
Exemple #10
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->data = $this->getFileData();
 }
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->validation = $this->get('validation');
 }
Exemple #12
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->reconnect();
 }
Exemple #13
0
 public function onRegister()
 {
     parent::onRegister();
     // -----
     $this->session = $this->get('session');
 }