/usr/share/php/kohana3.1/system/classes/kohana/config/file.php is in libkohana3.1-core-php 3.1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <?php defined('SYSPATH') or die('No direct script access.');
/**
* File-based configuration reader. Multiple configuration directories can be
* used by attaching multiple instances of this class to [Config].
*
* @package Kohana
* @category Configuration
* @author Kohana Team
* @copyright (c) 2009-2011 Kohana Team
* @license http://kohanaframework.org/license
*/
class Kohana_Config_File extends Config_Reader {
/**
* @var string Configuration group name
*/
protected $_configuration_group;
/**
* @var bool Has the config group changed?
*/
protected $_configuration_modified = FALSE;
public function __construct($directory = 'config')
{
// Set the configuration directory name
$this->_directory = trim($directory, '/');
// Load the empty array
parent::__construct();
}
/**
* Load and merge all of the configuration files in this group.
*
* $config->load($name);
*
* @param string configuration group name
* @param array configuration array
* @return $this clone of the current object
* @uses Kohana::load
*/
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);
}
} // End Kohana_Config_File
|