Esempio n. 1
0
 public static function getConfig($deepKey = null, $defaultValue = null)
 {
     if (empty(self::$_config)) {
         return $defaultValue;
     }
     if ($deepKey) {
         return self::$_config->getDeepValue($deepKey, $defaultValue);
     }
 }
Esempio n. 2
0
 public function __call($method, $params)
 {
     $operation = substr($method, 0, 3);
     if (in_array($operation, array('get', 'set'))) {
         if (substr($method, -4) == 'Root') {
             $key = 'roots/' . strtolower(substr($method, 3, -4));
         } else {
             $key = strtolower(substr($method, 3));
         }
         if ($operation == 'get') {
             return $this->_vars->getDeepValue($key);
         } else {
             $this->_vars->setDeepValue($key, $params[0]);
             DC::getEventDispatcher()->dispatchEvent('environment.update', $key);
             return $this;
         }
     } else {
         return $this;
     }
 }
Esempio n. 3
0
 public function getAbilityInfo($name)
 {
     return $this->_data->getDeepValue('abilities/' . $name);
 }
Esempio n. 4
0
 public function get($deepKey, $defaultValue = null)
 {
     return $this->_combinedData->getDeepValue($deepKey, $defaultValue);
 }
Esempio n. 5
0
 public function getVar($deepKey, $defaultValue = null)
 {
     return $this->_vars->getDeepValue($deepKey, $defaultValue);
 }