PHP Class xajaxFunctionPlugin

Inheritance: extends xajaxRequestPlugin
Show file Open project: xajax/xajax

Public Properties

Property Type Description
$aFunctions An array of object that are registered and available via a call.
$bDeferScriptGeneration
$sDefer Configuration option that can be used to request that the javascript file is loaded after the page has been fully loaded.
$sRequestedFunction This string is used to temporarily hold the name of the function that is being requested (during the request processing phase). Since canProcessRequest loads this value from the get or post data, it is unnecessary to load it again.
$sXajaxPrefix A configuration setting that is stored locally and used during the client script generation phase.

Public Methods

Method Description
canProcessRequest ( ) * Function: canProcessRequest
configure ( $sName, $mValue ) * Function: configure
generateClientScript ( ) * Function: generateClientScript
generateHash ( )
processRequest ( ) * Function: processRequest
register ( $aArgs ) * Function: register
xajaxFunctionPlugin ( ) * Function: xajaxFunctionPlugin

Method Details

canProcessRequest() public method

Determines whether or not the current request can be processed by this plugin. Returns: boolean - True if the current request can be handled by this plugin; false otherwise.
public canProcessRequest ( )

configure() public method

Sets/stores configuration options used by this plugin.
public configure ( $sName, $mValue )

generateClientScript() public method

Called by the during the client script generation phase. This is used to generate a block of javascript code that will contain function declarations that can be used on the browser through javascript to initiate xajax requests.

generateHash() public method

public generateHash ( )

processRequest() public method

Called by the when a request needs to be processed. Returns: mixed - True when the request has been processed successfully. An error message when an error has occurred.
public processRequest ( )

register() public method

Provides a mechanism for functions to be registered and made available to the page via the javascript call.
public register ( $aArgs )

xajaxFunctionPlugin() public method

Constructs and initializes the . The GET and POST data is searched for xajax function call parameters. This will later be used to determine if the request is for a registered function in canProcessRequest>
public xajaxFunctionPlugin ( )

Property Details

$aFunctions public property

An array of object that are registered and available via a call.
public $aFunctions

$bDeferScriptGeneration public property

public $bDeferScriptGeneration

$sDefer public property

Configuration option that can be used to request that the javascript file is loaded after the page has been fully loaded.
public $sDefer

$sRequestedFunction public property

This string is used to temporarily hold the name of the function that is being requested (during the request processing phase). Since canProcessRequest loads this value from the get or post data, it is unnecessary to load it again.
public $sRequestedFunction

$sXajaxPrefix public property

A configuration setting that is stored locally and used during the client script generation phase.
public $sXajaxPrefix