Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
JSON Adapter for Zend_Config

bool
$_ignoreConstants= 'false'
Whether or not to ignore constants in the JSON string
Note: if you do not have constant names in quotations in your JSON string, they may lead to syntax errors when parsing.
false
Details
__construct(
string $json, mixed $section
=
null, boolean $options
=
false
)
:
void
Loads the section $section from the config file encoded as JSON
Sections are defined as properties of the main object
In order to extend another section, a section defines the "_extends" property having a value of the section name from which the extending section inherits values.
Note that the keys in $section will override any keys of the same name in the sections that have been included via "_extends".
Name | Type | Description |
---|---|---|
$json | string | JSON file or string to process |
$section | mixed | Section to process |
$options | boolean | Whether modifiacations are allowed at runtime |
Exception | Description |
---|---|
\Zend_Config_Exception | When JSON text is not set or cannot be loaded |
\Zend_Config_Exception | When section $sectionName cannot be found in $json |

_getConstants(
)
:
array
Get (reverse) sorted list of defined constant names
Type | Description |
---|---|
array |

_processExtends(
array $data, string $section, array $config
=
array()
)
:
array
Helper function to process each element in the section and handle the "_extends" inheritance attribute.
Name | Type | Description |
---|---|---|
$data | array | Data array to process |
$section | string | Section to process |
$config | array | Configuration which was parsed yet |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Config_Exception | When $section cannot be found |