\Zend_Config_Yaml

YAML Adapter for Zend_Config

Synopsis

class Zend_Config_Yaml extends Zend_Config {
  • // constants
  • const EXTENDS_NAME = "_extends";
}

Hierarchy

Extends

Violations

PHPMessDetector

Line Rule Message
131 - 231 CyclomaticComplexity The method __construct() has a Cyclomatic Complexity of 22. The configured cyclomatic complexity threshold is 10.
131 - 231 NPathComplexity The method __construct() has an NPath complexity of 864. The configured NPath complexity threshold is 200.
131 - 231 ExcessiveMethodLength The phpmd\node\methodnode __construct() has 101 lines of code. Current threshold is set to 100. Avoid really long methods.
288 - 352 CyclomaticComplexity The method _decodeYaml() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.

Constants

Name Value
EXTENDS_NAME "_extends"

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.
  • $_ignoreConstantsbool
    Whether or not to ignore constants in parsed YAML
  • $_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.
  • $_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
  • $_yamlDecodercallable
    What to call when we need to decode some YAML?

Methods

protected

public

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