Config.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Config
- Version
- $Id$
\Zend_Config
- Implements
- Children
- \Zend_Config_Yaml
- \Zend_Config_Json
- \Zend_Config_Xml
- \Zend_Config_Ini
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

boolean $_allowModifications- Type
- boolean

array $_extends = array()array()Details- Type
- array

string $_loadFileErrorStr = nullnullDetails- Type
- string

mixed $_loadedSection- Type
- mixed
Methods

__construct(array $array, boolean $allowModifications = false) : voidZend_Config provides a property based interface to an array. The data are read-only unless $allowModifications is set to true on construction.
| Name | Type | Description |
|---|---|---|
| $array | array | |
| $allowModifications | boolean |

__get(string $name) : mixedMagic function so that $obj->value will work.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

__isset(string $name) : booleanSupport isset() overloading on PHP 5.1
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

__set(string $name, mixed $value) : voidOnly allow setting of a property if $allowModifications was set to true on construction. Otherwise, throw an exception.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Exception | Description |
|---|---|
| \Zend_Config_Exception |

__unset(string $name) : voidSupport unset() overloading on PHP 5.1
| Name | Type | Description |
|---|---|---|
| $name | string |
| Exception | Description |
|---|---|
| \Zend_Config_Exception |

_arrayMergeRecursive(mixed $firstArray, mixed $secondArray) : arrayMerge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray.
| Name | Type | Description |
|---|---|---|
| $firstArray | mixed | First array |
| $secondArray | mixed | Second array to merge into first array |
| Type | Description |
|---|---|
| array |

_assertValidExtend(string $extendingSection, string $extendedSection) : voidThrows an exception if $extendingSection may not extend $extendedSection, and tracks the section extension if it is valid.
| Name | Type | Description |
|---|---|---|
| $extendingSection | string | |
| $extendedSection | string |
| Exception | Description |
|---|---|
| \Zend_Config_Exception |

_loadFileErrorHandler(integer $errno, string $errstr, string $errfile, integer $errline) : voidHandle any errors from simplexml_load_file or parse_ini_file
| Name | Type | Description |
|---|---|---|
| $errno | integer | |
| $errstr | string | |
| $errfile | string | |
| $errline | integer |

areAllSectionsLoaded() : booleanReturns true if all sections were loaded
| Type | Description |
|---|---|
| boolean |

get(string $name, mixed $default = null) : mixedRetrieve a value and return $default if there is no element set.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $default | mixed |
| Type | Description |
|---|---|
| mixed |

merge(\Zend_Config $merge) : \Zend_ConfigMerge another Zend_Config with this one. The items in $merge will override the same named items in the current config.
| Name | Type | Description |
|---|---|---|
| $merge | \Zend_Config |
| Type | Description |
|---|---|
| \Zend_Config |

readOnly() : booleanReturns if this Zend_Config object is read only or not.
| Type | Description |
|---|---|
| boolean |

setExtend(string $extendingSection, string $extendedSection = null) : voidSet an extend for Zend_Config_Writer
| Name | Type | Description |
|---|---|---|
| $extendingSection | string | |
| $extendedSection | string |

setReadOnly() : voidPrevent any more modifications being made to this instance. Useful after merge() has been used to merge multiple Zend_Config objects into one object which should then not be modified again.