PHP 클래스 xajaxCometFunction

Construct instances of this class to define functions that will be registered with the request processor. This class defines the parameters that are needed for the definition of a xajax enabled function. While you can still specify functions by name during registration, it is advised that you convert to using this class when you wish to register external functions or to specify call options as well.
파일 보기 프로젝트 열기: xajax/xajax

공개 프로퍼티들

프로퍼티 타입 설명
$aConfiguration An associative array containing call options that will be sent to the browser curing client script generation.
$sAlias An alias to use for this function. This is useful when you want to call the same xajax enabled function with a different set of call options from what was already registered.
$sInclude The path and file name of the include file that contains the function.
$uf A string or array which defines the function to be registered.

공개 메소드들

메소드 설명
call ( $aArgs = [] ) * Function: call
configure ( $sName, $sValue ) * Function: configure
generateClientScript ( $sXajaxPrefix ) * Function: generateClientScript
generateRequest ( $sXajaxPrefix ) * Function: generateRequest
getName ( ) * Function: getName
xajaxCometFunction ( $uf, $sInclude = NULL, $aConfiguration = [] ) * Function: xajaxCometFunction

메소드 상세

call() 공개 메소드

Called by the that references this function during the request processing phase. This function will call the specified function, including an external file if needed and passing along the specified arguments.
public call ( $aArgs = [] )

configure() 공개 메소드

Call this to set call options for this instance.
public configure ( $sName, $sValue )

generateClientScript() 공개 메소드

Called by the that is referencing this function reference during the client script generation phase. This function will generate the javascript function stub that is sent to the browser on initial page load.
public generateClientScript ( $sXajaxPrefix )

generateRequest() 공개 메소드

Constructs and returns a object which is capable of generating the javascript call to invoke this xajax enabled function.
public generateRequest ( $sXajaxPrefix )

getName() 공개 메소드

Get the name of the function being referenced. Returns: string - the name of the function contained within this object.
public getName ( )

xajaxCometFunction() 공개 메소드

Constructs and initializes the object. $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 to help 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 string: the name of the function that is available at global scope (not in a class. $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. Examples: $myFunction = array('alias', 'myClass', 'myMethod'); $myFunction = array('alias', &$myObject, 'myMethod'); $myFunction = array('myClass', 'myMethod'); $myFunction = array(&$myObject, 'myMethod'); $myFunction = 'myFunction'; $myUserFunction = new xajaxCometFunction($myFunction, 'myFile.inc.php', array( 'method' => 'get', 'mode' => 'synchronous' )); $xajax->register(XAJAX_FUNCTION, $myUserFunction);
public xajaxCometFunction ( $uf, $sInclude = NULL, $aConfiguration = [] )

프로퍼티 상세

$aConfiguration 공개적으로 프로퍼티

An associative array containing call options that will be sent to the browser curing client script generation.
public $aConfiguration

$sAlias 공개적으로 프로퍼티

An alias to use for this function. This is useful when you want to call the same xajax enabled function with a different set of call options from what was already registered.
public $sAlias

$sInclude 공개적으로 프로퍼티

The path and file name of the include file that contains the function.
public $sInclude

$uf 공개적으로 프로퍼티

A string or array which defines the function to be registered.
public $uf