API DOCS
Function: register
function register($sType, $mArg)
Parameters:
$sType
(string) Type of request handler being registered; standard
options include
XAJAX_FUNCTION
a function declared at global scope.
XAJAX_CALLABLE_OBJECT
an object who's methods are to be registered.
XAJAX_EVENT
an event which will cause zero or more event handlers to be called.
XAJAX_EVENT_HANDLER
register an event handler function.
$sFunction || $objObject || $sEvent
(mixed) when registering a function, this is the name of the functionwhen registering a callable object, this is the object being registeredwhen registering an event or event handler, this is the name of the event$sIncludeFile || $aCallOptions || $sEventHandlerwhen registering a function, this is the (optional) include file.when registering a callable object, this is an (optional) arrayof call options for the functions being registered.when registering an event handler, this is the name of the function.
Examples
Register a normal function:Code: php
$xajax->register(XAJAX_FUNCTION,'my_function');
Register a synchronous function:
Code: php
$xajax->register(XAJAX_FUNCTION,'my_function',array('mode' => "'synchronous'");
