Access point / Container for global data
CONTENIDO used to use a huge amount of global variables. This, for sure, is not the best approach of handling data that has to be generally available in every corner of the code. As PHP is going to banish these beloved variables in a future version, we had to develop another solution. This brought us to the idea to build a registry holding all this data. In order to allow a smooth migration the registry already offers an easy read access to this data although the data itself is still global. This will change in a future version of CONTENIDO.
The registries heart is the protected method _fetchGlobalVariable() which provides access to global data and allows to define a default value if the requested data does not exist. All other getters are build ontop of this method. A rough overview of the data that can be accessed through the registry:
Furthermore the registry is flavoured with some convenience methods to ease the development of modules and plugins.