xajaxCallableObject. inc.php

Contains the xajaxCallableObject class

Summary
Contains the xajaxCallableObject class
Please see copyright.inc.php for a detailed description, copyright and license information.
A class that stores a reference to an object whose methods can be called from the client via a xajax request.
A reference to the callable object.
An associative array that will contain configuration options for zero or more of the objects methods.
Constructs and initializes the xajaxCallableObject
Returns the name of this callable object.
Used to set configuration options / call options for each method.
Produces an array of xajaxRequest objects, one for each method exposed by this callable object.
Called by xajaxCallableObject->generateClientScript while xajax is generating the javascript to be sent to the browser.
Determins if the specified class name matches the class name of the object referenced by xajaxCallableObject->obj.
Determines if the specified method name is one of the methods of the object referenced by xajaxCallableObject->obj.
Call the specified method of the object being referenced using the specified array of arguments.

xajaxCallableObject class

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

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.

Summary
A reference to the callable object.
An associative array that will contain configuration options for zero or more of the objects methods.
Constructs and initializes the xajaxCallableObject
Returns the name of this callable object.
Used to set configuration options / call options for each method.
Produces an array of xajaxRequest objects, one for each method exposed by this callable object.
Called by xajaxCallableObject->generateClientScript while xajax is generating the javascript to be sent to the browser.
Determins if the specified class name matches the class name of the object referenced by xajaxCallableObject->obj.
Determines if the specified method name is one of the methods of the object referenced by xajaxCallableObject->obj.
Call the specified method of the object being referenced using the specified array of arguments.

Variables

obj

var $obj

A reference to the callable object.

aConfiguration

var $aConfiguration

An associative array that will contain configuration options for zero or more of the objects methods.  These configuration options will define the call options for each request.  The call options will be passed to the client browser when the function stubs are generated.

Functions

xajaxCallableObject

function xajaxCallableObject(&$obj)

Constructs and initializes the xajaxCallableObject

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 xajaxRequest 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 xajaxCallableObject->generateClientScript call.

generateClientScript

function generateClientScript($sXajaxPrefix)

Called by xajaxCallableObject->generateClientScript while xajax 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 xajaxCallableObject->obj.

sClass(string): The name of the class to check.

Returns

booleanTrue of the specified class name matches the class of the object being referenced; false otherwise.

hasMethod

function hasMethod($sMethod)

Determines if the specified method name is one of the methods of the object referenced by xajaxCallableObject->obj.

sMethod(object): The name of the method to check.

Returns

booleanTrue of the referenced object contains the specified method, false otherwise.

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.
This file contains detailed information regarding the xajax project, current version, copyrights, licnese and documentation.
var $obj
A reference to the callable object.
var $aConfiguration
An associative array that will contain configuration options for zero or more of the objects methods.
function xajaxCallableObject(&$obj)
Constructs and initializes the xajaxCallableObject
function getName()
Returns the name of this callable object.
function configure($sMethod,
$sName,
$sValue)
Used to set configuration options / call options for each method.
function generateRequests($sXajaxPrefix)
Produces an array of xajaxRequest objects, one for each method exposed by this callable object.
Used to store and generate the client script necessary to invoke a xajax request from the browser to the server script.
function generateClientScript($sXajaxPrefix)
Called by xajaxCallableObject->generateClientScript while xajax is generating the javascript to be sent to the browser.
function isClass($sClass)
Determins if the specified class name matches the class name of the object referenced by xajaxCallableObject->obj.
function hasMethod($sMethod)
Determines if the specified method name is one of the methods of the object referenced by xajaxCallableObject->obj.
function call($sMethod,
$aArgs)
Call the specified method of the object being referenced using the specified array of arguments.