25 #require_once 'Zend/Config.php'; 30 #require_once 'Zend/Json.php'; 85 #require_once 'Zend/Config/Exception.php'; 89 $allowModifications =
false;
94 switch (strtolower($key)) {
95 case 'allow_modifications':
96 case 'allowmodifications':
97 $allowModifications = (bool)
$value;
101 $this->_skipExtends = (bool)
$value;
103 case 'ignore_constants':
104 case 'ignoreconstants':
105 $this->_ignoreConstants = (bool)
$value;
113 set_error_handler(array($this,
'_loadFileErrorHandler'));
114 if ($json[0] !=
'{') {
117 restore_error_handler();
120 if ($this->_loadFileErrorStr !==
null) {
121 #require_once 'Zend/Config/Exception.php'; 126 if (!$this->_ignoreConstants) {
135 #require_once 'Zend/Config/Exception.php'; 139 if ($section ===
null) {
140 $dataArray = array();
141 foreach (
$config as $sectionName => $sectionData) {
145 parent::__construct($dataArray, $allowModifications);
146 }
elseif (is_array($section)) {
147 $dataArray = array();
148 foreach ($section as $sectionName) {
149 if (!isset(
$config[$sectionName])) {
150 #require_once 'Zend/Config/Exception.php'; 157 parent::__construct($dataArray, $allowModifications);
159 if (!isset(
$config[$section])) {
160 #require_once 'Zend/Config/Exception.php'; 165 if (!is_array($dataArray)) {
167 $dataArray = array($section => $dataArray);
170 parent::__construct($dataArray, $allowModifications);
173 $this->_loadedSection = $section;
188 if (!isset(
$data[$section])) {
189 #require_once 'Zend/Config/Exception.php'; 193 $thisSection =
$data[$section];
195 if (is_array($thisSection) && isset($thisSection[self::EXTENDS_NAME])) {
196 if (is_array($thisSection[self::EXTENDS_NAME])) {
197 #require_once 'Zend/Config/Exception.php'; 202 if (!$this->_skipExtends) {
205 unset($thisSection[self::EXTENDS_NAME]);
222 if (strstr(
$value, $constant)) {
224 $replacement = str_replace(
'\\',
'\\\\', constant($constant));
238 $constants = array_keys(get_defined_constants());
239 rsort($constants, SORT_STRING);
static decode($encodedValue, $objectDecodeType=Zend_Json::TYPE_ARRAY)
elseif(isset( $params[ 'redirect_parent']))
_replaceConstants($value)
_processExtends(array $data, $section, array $config=array())
_assertValidExtend($extendingSection, $extendedSection)
_arrayMergeRecursive($firstArray, $secondArray)
__construct($json, $section=null, $options=false)