You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
790 B
39 lines
790 B
<?php
|
|
|
|
namespace Fuel\Core;
|
|
|
|
/**
|
|
* INI Config file parser
|
|
*/
|
|
class Config_Ini extends \Config_File
|
|
{
|
|
/**
|
|
* @var string the extension used by this ini file parser
|
|
*/
|
|
protected $ext = '.ini';
|
|
|
|
/**
|
|
* Loads in the given file and parses it.
|
|
*
|
|
* @param string $file File to load
|
|
* @return array
|
|
*/
|
|
protected function load_file($file)
|
|
{
|
|
$contents = $this->parse_vars(file_get_contents($file));
|
|
return parse_ini_string($contents, true);
|
|
}
|
|
|
|
/**
|
|
* Returns the formatted config file contents.
|
|
*
|
|
* @param array $contents config array
|
|
* @return string formatted config file contents
|
|
* @throws \ConfigException
|
|
*/
|
|
protected function export_format($contents)
|
|
{
|
|
throw new \ConfigException('Saving config to ini is not supported at this time');
|
|
}
|
|
}
|