PHP Class xajaxPluginManager

xajax version 0.5 (Beta 1) copyright (c) 2006 by Jared White & J. Max Wilson http://www.xajaxproject.org xajax is an open source PHP class library for easily creating powerful PHP-driven, web-based Ajax Applications. Using xajax, you can asynchronously call PHP functions and update the content of your your webpage without reloading the page. xajax is released under the terms of the BSD license http://www.xajaxproject.org/bsd_license.txt
Mostrar archivo Open project: xajax/xajax Class Usage Examples

Public Properties

Property Type Description
$aJsFiles

Public Methods

Method Description
canProcessRequest ( ) * Function: canProcessRequest
configure ( $sName, $mValue ) * Function: configure
generateClientScript ( ) * Function: generateClientScript
getInstance ( ) * Function: getInstance
getRequestPlugin ( $sName ) * Function: getRequestPlugin
getResponsePlugin ( $sName ) * Function: getResponsePlugin
loadPlugins ( $aFolders ) * Function: loadPlugins
processRequest ( ) * Function: processRequest
register ( $aArgs ) * Function: register
registerPlugin ( $objPlugin, $nPriority = 1000 ) * Function: registerPlugin

Private Methods

Method Description
__construct ( )
_getScriptFilename ( $sFilename ) * Function: _getScriptFilename
_insertIntoArray ( &$aPlugins, $objPlugin, $nPriority ) * Function: _insertIntoArray Inserts an entry into an array given the specified priority number.
generateHash ( )
printPluginScripts ( )

Method Details

canProcessRequest() public method

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 canProcessRequest> for more information.
public canProcessRequest ( )

configure() public method

Call each of the request plugins passing along the configuration setting specified. Parameters: sName - (string): The name of the configuration setting to set. mValue - (mixed): The value to be set.
public configure ( $sName, $mValue )

generateClientScript() public method

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.

getInstance() public static method

Implementation of the singleton pattern: returns the one and only instance of the xajax plugin manager. Returns: object : a reference to the one and only instance of the plugin manager.
public static getInstance ( )

getRequestPlugin() public method

Locate the specified response plugin by name and return a reference to it if one exists. Parameters: $sName - (string): Name of the plugin. Returns: mixed : Returns plugin or false if not found.
public getRequestPlugin ( $sName )

getResponsePlugin() public method

Locate the specified response plugin by name and return a reference to it if one exists. Parameters: $sName - (string): Name of the plugin. Returns: mixed : Returns plugin or false if not found.
public getResponsePlugin ( $sName )

loadPlugins() public method

Loads plugins from the folders specified. Parameters: $aFolders - (array): Array of folders to check for plugins
public loadPlugins ( $aFolders )

processRequest() public method

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

register() public method

Call each of the request plugins and give them the opportunity to handle the registration of the specified function, event or callable object. Parameters: $aArgs - (array) :
public register ( $aArgs )

registerPlugin() public method

Registers a plugin. Parameters: objPlugin - (object): A reference to an instance of a plugin. Note: 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
public registerPlugin ( $objPlugin, $nPriority = 1000 )

Property Details

$aJsFiles public_oe property

public $aJsFiles