Ejemplo n.º 1
0
 public function set($deepKey, $value, $toEnvironment = null)
 {
     //@todo hasDeepKey
     if ($this->_environmentData && ($this->_environmentData->hasDeep($deepKey) && $toEnvironment !== false) || $toEnvironment === true) {
         $this->_environmentData->setDeepValue($deepKey, $value);
     } else {
         $this->_originalData->setDeepValue($deepKey, $value);
     }
     $this->_combinedData->setDeepValue($deepKey, $value);
     return $this;
 }
Ejemplo n.º 2
0
 public function boot()
 {
     $this->_config = new YamlStorage($this->getRoot() . 'config.yml');
     if (!$this->_config->has('routes')) {
         throw new \Exception('Routes not found for app [' . $this->_name . '], in ' . $this->_config->getPath());
     }
     DC::getRouter()->addRoutes($this->_config->get('routes'));
     if ($events = $this->_config->get('events')) {
         foreach ($events as $event => $listener) {
             DC::getEventDispatcher()->addEventListener($event, $listener);
         }
     }
     $this->detectApplicationRoute();
 }