public static function config($key, $value = null){

    if(!array_key_exists($key, static::$config))
      throw new \Exception(sprintf('Unrecognized option: "%s". Valid options are: %s', $key, implode(', ', array_keys(static::$config))));

    if($value === null)
      return static::$config[$key];

    if(is_array(static::$config[$key]))
      return static::$config[$key] = (array)$value;

    return static::$config[$key] = $value;
  }
public static function config($key, $value = null){

    if(!array_key_exists($key, static::$config))
      throw new \Exception(sprintf('Unrecognized option: "%s". Valid options are: %s', $key, implode(', ', array_keys(static::$config))));

    if($value === null)
      return static::$config[$key];

    if(is_array(static::$config[$key]))
      return static::$config[$key] = (array)$value;

    return static::$config[$key] = $value;
  }
public static function config ( $ key , $ value = null ) { if ( ! array_key_exists ( $ key , static :: $ config ) ) throw new \ Exception ( sprintf ( 'Unrecognized option: "%s". Valid options are: %s' , $ key , implode ( ', ' , array_keys ( static :: $ config ) ) ) ) ; if ( $ value === null ) return static :: $ config [ $ key ] ; if ( is_array ( static :: $ config [ $ key ] ) ) return static :: $ config [ $ key ] = ( array ) $ value ; return static :: $ config [ $ key ] = $ value ; }
Set or get configuration options

@param   string $key
@param   mixed|null $value
@return  mixed
Set or get configuration options