Mecha CMS

Deep learning on using the API.

Config

Configuration getter and setter.

1.0.02.0.02.2.0Genome

This class provides a mechanism for storing data globally in a well managed fashion: stores your variables/objects that you need in a global scope without polluting the global namespace of your application.

Instantiating this class to a different variable will not create a new storage due to its static architecture. To create a new container, you will need to extend this class to another class:

$A = new Config;
$A->foo = 1;

$B = new Config;

echo $A->foo; // `1`
echo $B->foo; // `1`
class Storage extends Config {}

$A = new Config;
$A->foo = 1;

$B = new Storage;

echo $A->foo; // `1`
echo $B->foo; // `null`