xajaxPluginManager. inc.php

Contains the xajax plugin manager.

Summary
Contains the xajax plugin manager.
Please see copyright.inc.php for a detailed description, copyright and license information.
Construct and initialize the one and only xajax plugin manager.
Implementation of the singleton pattern: returns the one and only instance of the xajax plugin manager.
Loads plugins from the folders specified.
Inserts an entry into an array given the specified priority number.
Registers a plugin.
Calls each of the request plugins and determines if the current request can be processed by one of them.
Calls each of the request plugins to request that they process the current request.
Call each of the request plugins passing along the configuration setting specified.
Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object.
Call each of the request and response plugins giving them the opportunity to output some javascript to the page being generated.
Locate the specified response plugin by name and return a reference to it if one exists.

xajax plugin manager

Please see copyright.inc.php for a detailed description, copyright and license information.

xajaxPluginManager

Summary
Construct and initialize the one and only xajax plugin manager.
Implementation of the singleton pattern: returns the one and only instance of the xajax plugin manager.
Loads plugins from the folders specified.
Inserts an entry into an array given the specified priority number.
Registers a plugin.
Calls each of the request plugins and determines if the current request can be processed by one of them.
Calls each of the request plugins to request that they process the current request.
Call each of the request plugins passing along the configuration setting specified.
Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object.
Call each of the request and response plugins giving them the opportunity to output some javascript to the page being generated.
Locate the specified response plugin by name and return a reference to it if one exists.

Variables

aRequestPlugins

var $aRequestPlugins

aResponsePlugins

var $aResponsePlugins

aConfigurable

var $aConfigurable

aRegistrars

var $aRegistrars

aProcessors

var $aProcessors

aClientScriptGenerators

var $aClientScriptGenerators

Functions

xajaxPluginManager

function xajaxPluginManager()

Construct and initialize the one and only xajax plugin manager.

getInstance

function &getInstance()

Implementation of the singleton pattern: returns the one and only instance of the xajax plugin manager.

Returns

objecta reference to the one and only instance of the plugin manager.

loadPlugins

function loadPlugins($aFolders)

Loads plugins from the folders specified.

_insertIntoArray

function _insertIntoArray(&$aPlugins,
&$objPlugin,
$nPriority)

Inserts an entry into an array given the specified priority number.  If a plugin already exists with the given priority, the priority is automatically incremented until a free spot is found.  The plugin is then inserted into the empty spot in the array.

nPriorityNumber(number): The desired priority, used to order the plugins.

registerPlugin

function registerPlugin(&$objPlugin,  
$nPriority = 1000)

Registers a plugin.

objPlugin(object): A reference to an instance of a plugin.

Below is a table for priorities and their description

0 thru 999: Plugins that are part of or extensions to the xajax core 1000 thru 8999: User created plugins, typically, these plugins don’t care about order 9000 thru 9999: Plugins that generally need to be last or near the end of the plugin list

canProcessRequest

function canProcessRequest()

Calls each of the request plugins and determines if the current request can be processed by one of them.  If no processor identifies the current request, then the request must be for the initial page load.

See xajax->canProcessRequest for more information.

processRequest

function processRequest()

Calls each of the request plugins to request that they process the current request.  If the plugin processes the request, it will return true.

configure

function configure($sName,
$mValue)

Call each of the request plugins passing along the configuration setting specified.

sName(string): The name of the configuration setting to set.
mValue(mixed): The value to be set.

register

function register($aArgs)

Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object.

generateClientScript

function generateClientScript()

Call each of the request and response plugins giving them the opportunity to output some javascript to the page being generated.  This is called only when the page is being loaded initially.  This is not called when processing a request.

getPlugin

function &getPlugin($sName)

Locate the specified response plugin by name and return a reference to it if one exists.

This file contains detailed information regarding the xajax project, current version, copyrights, licnese and documentation.
var $aRequestPlugins
var $aResponsePlugins
var $aConfigurable
var $aRegistrars
var $aProcessors
var $aClientScriptGenerators
function xajaxPluginManager()
Construct and initialize the one and only xajax plugin manager.
function &getInstance()
Implementation of the singleton pattern: returns the one and only instance of the xajax plugin manager.
function loadPlugins($aFolders)
Loads plugins from the folders specified.
function _insertIntoArray(&$aPlugins,
&$objPlugin,
$nPriority)
Inserts an entry into an array given the specified priority number.
function registerPlugin(&$objPlugin,  
$nPriority = 1000)
Registers a plugin.
function canProcessRequest()
Calls each of the request plugins and determines if the current request can be processed by one of them.
function processRequest()
Calls each of the request plugins to request that they process the current request.
function configure($sName,
$mValue)
Call each of the request plugins passing along the configuration setting specified.
function register($aArgs)
Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object.
function generateClientScript()
Call each of the request and response plugins giving them the opportunity to output some javascript to the page being generated.
function &getPlugin($sName)
Locate the specified response plugin by name and return a reference to it if one exists.
function canProcessRequest()
Determines if a call is a xajax request or a page load request.