\Zend_Config_Ini

  • 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_Ini extends Zend_Config {
}

Hierarchy

Extends

Violations

PHPMessDetector

Line Rule Message
101 - 160 CyclomaticComplexity The method __construct() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.

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.
  • $_nestSeparator — string
    String that separates nesting levels of configuration data identifiers
  • $_sectionSeparator — string
    String that separates the parent section name
  • $_skipExtends — boolean
    Whether to skip extends or not
  • $_skipNextIteration — boolean
    Used when unsetting values during iteration to ensure we do not skip the next element

Methods

protected

  • _loadIniFile() — Load the ini file and preprocess the section separator (':' in the section name (that is used for section extension) so that the resultant array has the correct section names and the extension information is stored in a sub-key called ';extends'. We use ';extends' as this can never be a valid key name in an INI file that has been loaded using parse_ini_file().
  • _parseIniFile() — Load the INI file from disk using parse_ini_file(). Use a private error handler to convert any loading errors into a Zend_Config_Exception
  • _processKey() — Assign the key's value to the property list. Handles the nest separator for sub-properties.
  • _processSection() — Process each element in the section and handle the ";extends" inheritance key. Passes control to _processKey() to handle the nest separator sub-property syntax that may be used within the key name.

Inherited from Zend_Config

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

  • __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.
  • 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