API DOCS

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

Function: xajaxUserFunction


function xajaxUserFunction($uf, $sInclude=NULL, $aConfiguration=array()

Parameters:

$uf
(mixed) A function specification in one of the following formats - a three element array

(string) Alternate function name
when a method of a class has the same name as another function in the system, you can provide an alias tohelp avoid collisions.

(object or class name) Class
the name of the class or an instance of the object which contains the function to be called.

(string) Method
the name of the method that will be called. - a two element array

(object or class name) Class
the name of the class or an instance of the object which contains the function to be called.

(string) Method
the name of the method that will be called. - a stringthe name of the function that is available at global scope (not in aclass.

$sInclude
(string, optional) The path and file name of the include file that contains the class or function to be called.

$aConfiguration
(array, optional) An associative array of call options that will be used when sending the request from the client.


Example

Code: php

 
$myFunction = array('alias', 'myClass', 'myMethod');
$myFunction = array('alias', &$myObject, 'myMethod');
$myFunction = array('myClass', 'myMethod');
$myFunction = array(&$myObject, 'myMethod');
$myFunction = 'myFunction';
 
$myUserFunction = new xajaxUserFunction($myFunction, 'myFile.inc.php', array(
'method' => 'get',
'mode' => 'synchronous'
));
 
$xajax->register(XAJAX_FUNCTION, $myUserFunction);
 

 



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