getDefault() public static method

public static getDefault ( string $type ) : Config
$type string
return Config
示例#1
0
 public function testEmptyDefault()
 {
     is(null, Config::getDefault('undefined'));
 }
示例#2
0
 /**
  * @param Config $config
  * @return Config
  * @throws \JBZoo\SimpleTypes\Exception
  */
 protected function _getConfig(Config $config = null)
 {
     $defaultConfig = Config::getDefault($this->_type);
     $config = $config ? $config : $defaultConfig;
     // Hack for getValidValue method
     if (!$defaultConfig && $config) {
         Config::registerDefault($this->_type, $config);
     }
     return $config;
 }