PHP Class xajaxCallableObject

A class that stores a reference to an object whose methods can be called from the client via a xajax request. will call generateClientScript> so that stub functions can be generated and sent to the browser.
Datei anzeigen Open project: xajax/xajax Class Usage Examples

Public Methods

Method Description
__construct ( $obj ) * Function: xajaxCallableObject
call ( $sMethod, $aArgs ) * Function: call
configure ( $sMethod, $sName, $sValue ) * Function: configure
generateClientScript ( $sXajaxPrefix ) * Function: generateClientScript
generateRequests ( $sXajaxPrefix ) * Function: generateRequests
getMethods ( )
getName ( ) * Function: getName
hasMethod ( $sMethod ) * Function: hasMethod
isClass ( $sClass ) * Function: isClass

Method Details

__construct() public method

Constructs and initializes the obj - (object): The object to reference.
public __construct ( $obj )

call() public method

Call the specified method of the object being referenced using the specified array of arguments. sMethod - (string): The name of the method to call. aArgs - (array): The arguments to pass to the method.
public call ( $sMethod, $aArgs )

configure() public method

Used to set configuration options / call options for each method. sMethod - (string): The name of the method. sName - (string): The name of the configuration option. sValue - (string): The value to be set.
public configure ( $sMethod, $sName, $sValue )

generateClientScript() public method

Called by generateClientScript> while is generating the javascript to be sent to the browser. sXajaxPrefix - (string): The prefix to be prepended to the javascript function names.
public generateClientScript ( $sXajaxPrefix )

generateRequests() public method

Produces an array of objects, one for each method exposed by this callable object. sXajaxPrefix - (string): The prefix to be prepended to the javascript function names; this will correspond to the name used for the function stubs that are generated by the generateClientScript> call.
public generateRequests ( $sXajaxPrefix )

getMethods() public method

public getMethods ( )

getName() public method

Returns the name of this callable object. This is typically the class name of the object.
public getName ( )

hasMethod() public method

Determines if the specified method name is one of the methods of the object referenced by obj>. sMethod - (object): The name of the method to check. Returns: boolean - True of the referenced object contains the specified method, false otherwise.
public hasMethod ( $sMethod )

isClass() public method

Determins if the specified class name matches the class name of the object referenced by obj>. sClass - (string): The name of the class to check. Returns: boolean - True of the specified class name matches the class of the object being referenced; false otherwise.
public isClass ( $sClass )