category Zend
package Zend_Config
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Deep clone of this instance to ensure that nested Zend_Configs are also cloned.

__clone() : void

Zend_Config provides a property based interface to an array. The data are read-only unless $allowModifications is set to true on construction.

__construct(array $array, boolean $allowModifications = false) : void

Zend_Config also implements Countable and Iterator to facilitate easy access to the data.

Parameters

$array

array

$allowModifications

boolean

Magic function so that $obj->value will work.

__get(string $name) : mixed

Parameters

$name

string

Returns

mixed

Support isset() overloading on PHP 5.1

__isset(string $name) : boolean

Parameters

$name

string

Returns

boolean

Only allow setting of a property if $allowModifications was set to true on construction. Otherwise, throw an exception.

__set(string $name, mixed $value) : void

Parameters

$name

string

$value

mixed

Exceptions

\Zend_Config_Exception

Support unset() overloading on PHP 5.1

__unset(string $name) : void

Parameters

$name

string

Exceptions

\Zend_Config_Exception

Handle any errors from simplexml_load_file or parse_ini_file

_loadFileErrorHandler(integer $errno, string $errstr, string $errfile, integer $errline) 

Parameters

$errno

integer

$errstr

string

$errfile

string

$errline

integer

Returns true if all sections were loaded

areAllSectionsLoaded() : boolean

Returns

boolean

Defined by Countable interface

count() : integer

Returns

integer

Defined by Iterator interface

current() : mixed

Returns

mixed

Retrieve a value and return $default if there is no element set.

get(string $name, mixed $default = null) : mixed

Parameters

$name

string

$default

mixed

Returns

mixed

Get the current extends

getExtends() : array

Returns

array

Returns the section name(s) loaded.

getSectionName() : mixed

Returns

mixed

Defined by Iterator interface

key() : mixed

Returns

mixed

Merge another Zend_Config with this one. The items in $merge will override the same named items in the current config.

merge(\Zend_Config $merge) : \Zend_Config

Parameters

$merge

\Zend_Config

Returns

\Zend_Config

Defined by Iterator interface

next() 

Returns if this Zend_Config object is read only or not.

readOnly() : boolean

Returns

boolean

Defined by Iterator interface

rewind() 

Set an extend for Zend_Config_Writer

setExtend(string $extendingSection, string $extendedSection = null) : void

Parameters

$extendingSection

string

$extendedSection

string

Prevent 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.

setReadOnly() 

Return an associative array of the stored data.

toArray() : array

Returns

array

Defined by Iterator interface

valid() : boolean

Returns

boolean

Merge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray.

_arrayMergeRecursive(mixed $firstArray, mixed $secondArray) : array

Parameters

$firstArray

mixed

First array

$secondArray

mixed

Second array to merge into first array

Returns

array

Throws an exception if $extendingSection may not extend $extendedSection, and tracks the section extension if it is valid.

_assertValidExtend(string $extendingSection, string $extendedSection) : void

Parameters

$extendingSection

string

$extendedSection

string

Exceptions

\Zend_Config_Exception

 Properties

 

Whether in-memory modifications to configuration data are allowed

$_allowModifications : boolean

Default

 

Number of elements in configuration data

$_count : integer

Default

 

Contains array of configuration data

$_data : array

Default

 

This is used to track section inheritance. The keys are names of sections that extend other sections, and the values are the extended sections.

$_extends : array

Default

array()
 

Iteration index

$_index : integer

Default

 

Load file error string.

$_loadFileErrorStr : string

Default

null

Is null if there was no error while file loading

 

Contains which config file sections were loaded. This is null if all sections were loaded, a string name if one section is loaded and an array of string names if multiple sections were loaded.

$_loadedSection : mixed

Default

 

Used when unsetting values during iteration to ensure we do not skip the next element

$_skipNextIteration : boolean

Default