objconfig package

Submodules

objconfig.config module

This is a port of zend-config to Python

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.config.Config(array, allowModifications=False)[source]

Bases: objconfig.util.countable.Countable, objconfig.util.iterator.Iterator, objconfig.util.arrayaccess.ArrayAccess

Following is the class documentation as given in zend-config:

/**
 * Provides a property based interface to an array.
 * The data are read-only unless $allowModifications is set to true
 * on construction.
 *
 * Implements Countable, Iterator and ArrayAccess
 * to facilitate easy access to the data.
 */
copy()[source]
get(name, default=None)[source]

Following is the header as given in zend-config:

/**
 * Retrieve a value and return $default if there is no element set.
 *
 * @param  string $name
 * @param  mixed  $default
 * @return mixed
 */
isReadOnly()[source]

Following is the header as given in zend-config:

/**
 * Returns whether this Config object is read only or not.
 *
 * @return bool
 */
merge(merge)[source]
Notes:
Checks for existence of merge and toArray method

Following is the header as given in zend-config:

/**
 * Merge another Config with this one.
 *
 * For duplicate keys, the following will be performed:
 * - Nested Configs will be recursively merged.
 * - Items in $merge with INTEGER keys will be appended.
 * - Items in $merge with STRING keys will overwrite current values.
 *
 * @param  Config $merge
 * @return Config
 */
setReadOnly()[source]
Note:
Tests for setReadOnly method

Following is the header as given in zend-config:

/**
 * Prevent any more modifications being made to this instance.
 *
 * Useful after merge() has been used to merge multiple Config objects
 * into one object which should then not be modified again.
 *
 * @return void
 */
toArray()[source]
Notes:
Returns a copy of the data dictionar(ies)

Following is the header as given in zend-config:

/**
 * Return an associative array of the stored data.
 *
 * @return array
 */

Module contents

objconfig.main()[source]

Entry point for the objconfig