Source for file class.mpglobals.php
Documentation is available at class.mpglobals.php
* Includes globals array access class.
* @author Murat Purc <murat@purc.de>
* @copyright © Murat Purc 2008
defined('CON_FRAMEWORK') or die('Illegal call');
include_once('class.mparraymanager.php');
* Globals array ($GLOBALS) manager class. Provides another way to access (reading/writing) to
* Number of access deepness to the array structure depends on extended class 'mpArrayManager'.
* This is by default up to 4 levels, e. g. $arr['one']['two']['three']['four'].
* The whole purpose of this class is to replace usage of superglobal $GLOBALS and the global
* declaration of variables (global $foobar;) within functions.
* @see http://www.php.net/manual/en/language.variables.scope.php
* // example globals content
* $GLOBALS['key']['subkey']['anotherkey'] = 123;
* // example access (assuming that access delemiter is /)
* $glob = mpGlobals::getInstance();
* echo $glob->get('key/subkey/anotherkey');
* // example for setting the content
* $glob->set('key/subkey/anotherkey', 321);
* @author Murat Purc <murat@purc.de>
* Constructor, stores the reference to $GLOBALS into member variable _aData.
* Returns a instance of mpGlobals (singleton implementation)
if (self::$_instance ==
null) {
self::$_instance =
new mpGlobals();
Documentation generated on Sun, 08 Feb 2009 22:00:47 +0100 by phpDocumentor 1.4.1