JBZoo\SimpleTypes\Config\Config::registerDefault PHP Method

registerDefault() public static method

public static registerDefault ( string $type, Config $config )
$type string
$config Config
    public static function registerDefault($type, Config $config)
    {
        $type = trim(strtolower($type));
        self::$_configs[$type] = $config;
    }

Usage Example

Example #1
0
 /**
  * @param null $arg
  * @return \JBZoo\SimpleTypes\Type\Type
  */
 public function val($arg = null)
 {
     $configName = '\\JBZoo\\SimpleTypes\\Config\\' . ucfirst($this->_type);
     $className = '\\JBZoo\\SimpleTypes\\Type\\' . $this->_type;
     Config::registerDefault($this->_type, new $configName());
     return new $className($arg);
 }
All Usage Examples Of JBZoo\SimpleTypes\Config\Config::registerDefault