API Documentation

Config.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Config
version
$Id: Config.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Config

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Config

Implements
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Config
Properties
$_allowModifications
$_index
$_count
$_data
$_skipNextIteration
$_loadedSection
$_extends
$_loadFileErrorStr
Methods
__construct
get
__get
__set
__clone
toArray
__isset
__unset
count
current
key
next
rewind
valid
getSectionName
areAllSectionsLoaded
merge
setReadOnly
readOnly
getExtends
setExtend
_assertValidExtend
_loadFileErrorHandler
_arrayMergeRecursive

Description

Properties

$_allowModifications

boolean $_allowModifications = ''

Whether in-memory modifications to configuration data are allowed

Details

$_allowModifications
boolean
visibility
protected
default
final
false
static
false

$_count

integer $_count = ''

Number of elements in configuration data

Details

$_count
integer
visibility
protected
default
final
false
static
false

$_data

array $_data = ''

Contains array of configuration data

Details

$_data
array
visibility
protected
default
final
false
static
false

$_extends

array $_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.

Details

$_extends
array
visibility
protected
default
array
final
false
static
false

$_index

integer $_index = ''

Iteration index

Details

$_index
integer
visibility
protected
default
final
false
static
false

$_loadFileErrorStr

string $_loadFileErrorStr = 'null'

Load file error string.

Is null if there was no error while file loading

Details

$_loadFileErrorStr
string
visibility
protected
default
null
final
false
static
false

$_loadedSection

mixed $_loadedSection = ''

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.

Details

$_loadedSection
mixed
visibility
protected
default
final
false
static
false

$_skipNextIteration

boolean $_skipNextIteration = ''

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

Details

$_skipNextIteration
boolean
visibility
protected
default
final
false
static
false

Methods

__clone

__clone( ) : void

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

Details
visibility
public
final
false
static
false

__construct

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

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

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

Arguments
$array
array
$allowModifications
boolean
Details
visibility
public
final
false
static
false

__get

__get( string $name ) : mixed

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

Arguments
$name
string
Output
mixed
Details
visibility
public
final
false
static
false

__isset

__isset( string $name ) : boolean

Support isset() overloading on PHP 5.1

Arguments
$name
string
Output
boolean
Details
visibility
public
final
false
static
false

__set

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

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

Arguments
$name
string
$value
mixed
Details
visibility
public
final
false
static
false
throws

__unset

__unset( string $name ) : void

Support unset() overloading on PHP 5.1

Arguments
$name
string
Details
visibility
public
final
false
static
false
throws

_arrayMergeRecursive

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

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

Arguments
$firstArray
mixed
First array
$secondArray
mixed
Second array to merge into first array
Output
array
Details
visibility
protected
final
false
static
false

_assertValidExtend

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

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

Arguments
$extendingSection
string
$extendedSection
string
Details
visibility
protected
final
false
static
false
throws

_loadFileErrorHandler

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

Handle any errors from simplexml_load_file or parse_ini_file

Arguments
$errno
integer
$errstr
string
$errfile
string
$errline
integer
Details
visibility
protected
final
false
static
false

areAllSectionsLoaded

areAllSectionsLoaded( ) : boolean

Returns true if all sections were loaded

Output
boolean
Details
visibility
public
final
false
static
false

count

count( ) : int

Defined by Countable interface

Output
int
Details
visibility
public
final
false
static
false

current

current( ) : mixed

Defined by Iterator interface

Output
mixed
Details
visibility
public
final
false
static
false

get

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

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

Arguments
$name
string
$default
mixed
Output
mixed
Details
visibility
public
final
false
static
false

getExtends

getExtends( ) : array

Get the current extends

Output
array
Details
visibility
public
final
false
static
false

getSectionName

getSectionName( ) : mixed

Returns the section name(s) loaded.

Output
mixed
Details
visibility
public
final
false
static
false

key

key( ) : mixed

Defined by Iterator interface

Output
mixed
Details
visibility
public
final
false
static
false

merge

merge( Zend_Config $merge ) : Zend_Config

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

Arguments
$merge
Zend_Config
Output
Zend_Config
Details
visibility
public
final
false
static
false

next

next( ) :

Defined by Iterator interface

Details
visibility
public
final
false
static
false

readOnly

readOnly( ) : boolean

Returns if this Zend_Config object is read only or not.

Output
boolean
Details
visibility
public
final
false
static
false

rewind

rewind( ) :

Defined by Iterator interface

Details
visibility
public
final
false
static
false

setExtend

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

Set an extend for Zend_Config_Writer

Arguments
$extendingSection
string
$extendedSection
string
Details
visibility
public
final
false
static
false

setReadOnly

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.

Details
visibility
public
final
false
static
false

toArray

toArray( ) : array

Return an associative array of the stored data.

Output
array
Details
visibility
public
final
false
static
false

valid

valid( ) : boolean

Defined by Iterator interface

Output
boolean
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.