Kohana_Config_File
› Kohana_Config_Reader
› ArrayObject
Class Contents
Constants
Properties
- None
Methods
- __construct()
- load()
- __toString()
- as_array()
- get()
- set()
- __construct()
- append()
- append()
- asort()
- asort()
- count()
- count()
- exchangeArray()
- exchangeArray()
- getArrayCopy()
- getArrayCopy()
- getFlags()
- getFlags()
- getIterator()
- getIterator()
- getIteratorClass()
- getIteratorClass()
- ksort()
- ksort()
- natcasesort()
- natcasesort()
- natsort()
- natsort()
- offsetExists()
- offsetExists()
- offsetGet()
- offsetGet()
- offsetSet()
- offsetSet()
- offsetUnset()
- offsetUnset()
- setFlags()
- setFlags()
- setIteratorClass()
- setIteratorClass()
- uasort()
- uasort()
- uksort()
- uksort()
Class declared in SYSPATH/classes/kohana/config/file.php on line 12.
Constants
- STD_PROP_LIST
integer 1
- ARRAY_AS_PROPS
integer 2
Methods
public __construct( )
› Kohana_Config_File
Source Code
public function __construct($directory = 'config')
{
// Set the configuration directory name
$this->_directory = trim($directory, '/');
// Load the empty array
parent::__construct();
}
public load( )
› Kohana_Config_File
Source Code
public function load($group, array $config = NULL)
{
if ($files = Kohana::find_file($this->_directory, $group, NULL, TRUE))
{
// Initialize the config array
$config = array();
foreach ($files as $file)
{
// Merge each file to the configuration array
$config = Arr::merge($config, Kohana::load($file));
}
}
return parent::load($group, $config);
}
public __toString( )
› Kohana_Config_Reader
Source Code
public function __toString()
{
return serialize($this->getArrayCopy());
}
public as_array( )
› Kohana_Config_Reader
Source Code
public function as_array()
{
return $this->getArrayCopy();
}
public get( )
› Kohana_Config_Reader
Source Code
public function get($key, $default = NULL)
{
return $this->offsetExists($key) ? $this->offsetGet($key) : $default;
}
public set( )
› Kohana_Config_Reader
Source Code
public function set($key, $value)
{
$this->offsetSet($key, $value);
return $this;
}
public __construct( )
› Kohana_Config_File
Source Code
public function __construct($directory = 'config')
{
// Set the configuration directory name
$this->_directory = trim($directory, '/');
// Load the empty array
parent::__construct();
}