Exemplo n.º 1
0
 public function getConfig($key, $default = null)
 {
     if (is_string($key)) {
         $prefix = get_class() . '::' . $key;
         $newDefault = constant($prefix . '_DEFAULT');
         if ($newDefault !== NULL) {
             $default = $newDefault;
         }
         if ($newKey = constant($prefix . '_KEY')) {
             $key = $newKey;
         }
     }
     return parent::getConfig($key, $default);
 }
 /**
  * @expectedException Application\Exceptions\InvalidArgumentException
  */
 public function testGetConfigArrayException()
 {
     $struct = new StructConfigModel($this->_data);
     $struct->getConfig(array('default' => 'pop1'));
 }