Module Initalization - the init() function
During the Module initialize
phase at the beginning, all of the modules _init() functions are run.
If you want to register for anything, this is where you do it. You can register that your module:
* Listens for an event
* Fires an event
* Has a CSS file that it wants included in the main compression CSS file
* Provides a MagicView
* Wants an extra tab in its admin area.
Check out other modules (module name)_init()
functions in their include.php file within their module structure.
Next, the URL is parsed and all of the components of the URL are split into parts and stored in the $_post variable.
Then, the session is fired up and we have the global $_user variable to use.
Some common global variable are:
- everything coming in via PHP's $_REQUEST super global (with additional params added by the Jamroom Core)
- information about the user looking at the screen.
- system config information, like the site name, URL, path, email etc.
These arrays are passed in to a module's view function