Nexista_InitThis class is reponsible for initializing the runtime process.
It is responsible for loading certain required files, initializing sessions, flow, etc.... and processing the correct files based on request and finally outputting the data.
The default output functionality, Init::display(), can be overriden with a custom function as defined by Init::registerOutputHandler. This function will then call the output command Init::run() itself and perform any desired pre-display processing such as cache the output, etc...
See example site for an example registerOutputHandler.
Located in /kernel/init.php (line 45)
static registerOutputHandler (line 423)
Registers a function to be called on output
This function can be used to manipulate the final output before it is displayed. It can be used to create a caching system, compress output etc...
The handler should be a callable function or array of object/method as defined in is_callable php function. It should accept 1 arguments:
This function should call: $output = Init::run(); to get the final output. The function is responsible for displaying it.
static singleton (line 438)
Returns a class singleton.
Constructor __construct (line 99)
Constructor - inits config
display (line 352)
Displays final output
This method is called from the loader file and is responsible for activating the run process and displaying the output. In the event that caching or an other pre-display processing is needed, this method can be overriden using a callback function registered with Init::registerOutputHandler(); This function needs to be a valid php callback (see call_user_func()) It needs to accept one argument, the reference to the Init object. It also needs to call the static Init::run() method and capture/display the returned string.
Here is an example
getInfo (line 376)
Returns the gate info in an array consisting only of the params that are specified by the sitemap. Possible items include: uri (always present), cache, and role.
initSession (line 194)
Init sessions
This method starts up a session and globalizes it.
loadConfig (line 129)
Loads site configuration info
loadPrepend (line 148)
Loads prepend file
The prepend file is an optional file as defined in config. While it can be used to hold any php code that the user may wish to have processed everytime but is specifically designed to run code before any output. Examples are headers and sessions.
process (line 237)
Reads sitemap for current gate data
This function retrieves the correct gate based on request.
run (line 309)
Pocesses final output
This function processes the correct gate based on request. In the event of not finding the correct gate, it will attempt to load the gate defined under build/missing in config. Failure to do so will result in a 404 redirect to be handled by the web server.
start (line 116)
Startup functions, init...
This method is responsible for calling all startup functions such as timers, flow init, etc..
stop (line 163)
Shutdown and cleanup
This method is responsible for shutting down the current request. It will clean up variables, send ob to ouput, etc..
Documentation generated on Tue, 11 Mar 2008 23:23:04 -0400 for Nexista 0.2.0