\Zend_Config
- Copyright: Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Config
implements
Countable,Iterator
{
- // members
- protected $_allowModifications;
- protected $_index;
- protected $_count;
- protected $_data;
- protected $_skipNextIteration;
- protected $_loadedSection;
- protected $_extends;
- protected $_loadFileErrorStr;
- // methods
- public void __construct()
- public mixed get()
- public mixed __get()
- public void __set()
- public void __clone()
- public array toArray()
- public boolean __isset()
- public void __unset()
- public int count()
- public mixed current()
- public mixed key()
- public void next()
- public void rewind()
- public boolean valid()
- public mixed getSectionName()
- public boolean areAllSectionsLoaded()
- public Zend_Config merge()
- public void setReadOnly()
- public boolean readOnly()
- public array getExtends()
- public void setExtend()
- protected void _assertValidExtend()
- protected void _loadFileErrorHandler()
- protected array _arrayMergeRecursive()
Hierarchy
Extended by
Implements
Members
protected
- $_allowModifications
—
boolean
Whether in-memory modifications to configuration data are allowed - $_count
—
integer
Number of elements in configuration data - $_data
—
array
Contains array of configuration data - $_extends
—
array
This is used to track section inheritance. The keys are names of sections that extend other sections, and the values are the extended sections. - $_index
—
integer
Iteration index - $_loadFileErrorStr
—
string
Load file error string. - $_loadedSection
—
mixed
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. - $_skipNextIteration
—
boolean
Used when unsetting values during iteration to ensure we do not skip the next element
Methods
protected
- _arrayMergeRecursive() — Merge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray.
- _assertValidExtend() — Throws an exception if $extendingSection may not extend $extendedSection, and tracks the section extension if it is valid.
- _loadFileErrorHandler() — Handle any errors from simplexml_load_file or parse_ini_file
public
- __construct() — Zend_Config provides a property based interface to an array. The data are read-only unless $allowModifications is set to true on construction.
- __clone() — Deep clone of this instance to ensure that nested Zend_Configs are also cloned.
- __get() — Magic function so that $obj->value will work.
- __isset() — Support isset() overloading on PHP 5.1
- __set() — Only allow setting of a property if $allowModifications was set to true on construction. Otherwise, throw an exception.
- __unset() — Support unset() overloading on PHP 5.1
- areAllSectionsLoaded() — Returns true if all sections were loaded
- count() — Defined by Countable interface
- current() — Defined by Iterator interface
- get() — Retrieve a value and return $default if there is no element set.
- getExtends() — Get the current extends
- getSectionName() — Returns the section name(s) loaded.
- key() — Defined by Iterator interface
- merge() — Merge another Zend_Config with this one. The items in $merge will override the same named items in the current config.
- next() — Defined by Iterator interface
- readOnly() — Returns if this Zend_Config object is read only or not.
- rewind() — Defined by Iterator interface
- setExtend() — Set an extend for Zend_Config_Writer
- setReadOnly() — 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.
- toArray() — Return an associative array of the stored data.
- valid() — Defined by Iterator interface
History
-
2014-09-29T11:07:23+02:00 (commit #15b41ee)
Author: Sylvain Rayé (sylvain.raye@rissip.com) / Commiter: Sylvain Rayé (sylvain.raye@rissip.com)
Add dependency library Zend_Config. Useful only for Unit Testing