API DOCS

DOCS & TUTORIALS » API DOCS » xajax_core » plugin_layer » support » xajaxCallableObject.inc.php » xajaxCallableObject

Class: xajaxCallableObject



A class that stores a reference to an object whose methods can be called from
the client via a xajax request. <xajax> will call
<xajaxCallableObject->generateClientScript> so that stub functions can be
generated and sent to the browser.

variables

functions

xajaxCallableObject

function xajaxCallableObject(&$obj)

Constructs and initializes the

obj - (object): The object to reference.

getName

function getName()

Returns the name of this callable object. This is typically the
class name of the object.

configure

function configure($sMethod, $sName, $sValue)

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.

generateRequests

function generateRequests($sXajaxPrefix)

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.

generateClientScript

function generateClientScript($sXajaxPrefix)

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.

isClass

function isClass($sClass)

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.


hasMethod

function hasMethod($sMethod)

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.


call

function call($sMethod, $aArgs)

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.

 



XAJAX on SourceForge.net
Support this project Valid XHTML 1.0 Transitional