original_string: public static function save($file, $config)
  	{
  		if ( ! is_array($config))
  		{
  			if ( ! isset(static::$items[$config]))
  			{
  				return false;
  			}
  			$config = static::$items[$config];
  		}
  
  		$info = pathinfo($file);
  		$type = 'php';
  
  		if (isset($info['extension']))
  		{
  			$type = $info['extension'];
  			// Keep extension when it's an absolute path, because the finder won't add it
  			if ($file[0] !== '/' and $file[1] !== ':')
  			{
  				$file = substr($file, 0, -(strlen($type) + 1));
  			}
  		}
  
  		$class = '\\Config_'.ucfirst($type);
  
  		if ( ! class_exists($class))
  		{
  			throw new \FuelException(sprintf('Invalid config type "%s".', $type));
  		}
  
  		$driver = new $class($file);
  
  		return $driver->save($config);
  	}
code: public static function save($file, $config)
  	{
  		if ( ! is_array($config))
  		{
  			if ( ! isset(static::$items[$config]))
  			{
  				return false;
  			}
  			$config = static::$items[$config];
  		}
  
  		$info = pathinfo($file);
  		$type = 'php';
  
  		if (isset($info['extension']))
  		{
  			$type = $info['extension'];
  			// Keep extension when it's an absolute path, because the finder won't add it
  			if ($file[0] !== '/' and $file[1] !== ':')
  			{
  				$file = substr($file, 0, -(strlen($type) + 1));
  			}
  		}
  
  		$class = '\\Config_'.ucfirst($type);
  
  		if ( ! class_exists($class))
  		{
  			throw new \FuelException(sprintf('Invalid config type "%s".', $type));
  		}
  
  		$driver = new $class($file);
  
  		return $driver->save($config);
  	}
code_tokens: public static function save ( $ file , $ config ) { if ( ! is_array ( $ config ) ) { if ( ! isset ( static :: $ items [ $ config ] ) ) { return false ; } $ config = static :: $ items [ $ config ] ; } $ info = pathinfo ( $ file ) ; $ type = 'php' ; if ( isset ( $ info [ 'extension' ] ) ) { $ type = $ info [ 'extension' ] ; // Keep extension when it's an absolute path, because the finder won't add it if ( $ file [ 0 ] !== '/' and $ file [ 1 ] !== ':' ) { $ file = substr ( $ file , 0 , - ( strlen ( $ type ) + 1 ) ) ; } } $ class = '\\Config_' . ucfirst ( $ type ) ; if ( ! class_exists ( $ class ) ) { throw new \ FuelException ( sprintf ( 'Invalid config type "%s".' , $ type ) ) ; } $ driver = new $ class ( $ file ) ; return $ driver -> save ( $ config ) ; }
docstring: Save a config array to disc.
  
  @param   string          $file      desired file name
  @param   string|array    $config    master config array key or config array
  @return  bool                       false when config is empty or invalid else \File::update result
docstring_tokens: Save a config array to disc .