constructor xajax [line 163]
xajax xajax(
[string
$sRequestURI = ''])
|
|
Sets up the xajax object and the plugin system
Parameters:
method autoCompressJavascript [line 683]
void autoCompressJavascript(
[string
$sJsFullFilename = NULL], [
$bAlways = false])
|
|
This method can be used to create a new xajax.js file out of the xajax_uncompressed.js file (which will only happen if xajax.js doesn't already exist on the filesystem).
Parameters:
method canProcessRequest [line 522]
boolean canProcessRequest(
)
|
|
Returns true if xajax can process the request, false if otherwise.
You can use this to determine if xajax needs to process the request or not. (executes request processor plugin)
method getCharEncoding [line 401]
string getCharEncoding(
)
|
|
Returns the character encoding for the HTTP output
method getFlag [line 284]
Returns the value of the flag
Parameters:
method getGlobalResponse [line 216]
Returns an
xajaxResponse object set up with this xajax object's encoding and entity settings. Use this for singleton-pattern response development.
method getJavascript [line 622]
string getJavascript(
[string
$sJsURI = ''], [array
$aJsFiles = array()])
|
|
Returns the xajax Javascript code that should be added to your HTML page between the
<head> </head> tags. (executes Javascript include plugin)
Usage:
<head>
...
< ?php echo $xajaxJSHead; ? >
Parameters:
method getJavascriptConfig [line 638]
string getJavascriptConfig(
)
|
|
Returns a string containing inline Javascript that sets up the xajax runtime (typically called internally by xajax from get/printJavascript).
(executes Javascript include plugin)
method getJavascriptInclude [line 666]
string getJavascriptInclude(
[string
$sJsURI = ''], [array
$aJsFiles = array()])
|
|
Returns a string containing a Javascript include of the xajax.js file along with a check to see if the file loaded after six seconds (typically called internally by xajax from get/printJavascript).
(executes Javascript include plugin)
Parameters:
method getLogFile [line 376]
Returns the log file to use for error output (or "" if no log file is to be used)
method getRegisteredCallableObjects [line 500]
array getRegisteredCallableObjects(
)
|
|
Returns an associative array of callable objects
method getRegisteredEvents [line 510]
array getRegisteredEvents(
)
|
|
Returns an associative array of event definitions
method getRegisteredFunctions [line 490]
array getRegisteredFunctions(
)
|
|
Returns an associative array of registered function definitions
method getRequestMode [line 535]
Returns the current request mode (XAJAX_GET or XAJAX_POST), or -1 if there is none. (executes request processor plugin)
method getRequestURI [line 333]
Returns the current request URI
method getTimeout [line 311]
Returns the xajax Javascript timeout
Tags:
method getVersion [line 230]
Returns the current xajax version.
method getWrapperPrefix [line 354]
string getWrapperPrefix(
)
|
|
Returns the Javascript wrapper prefix
method printJavascript [line 587]
void printJavascript(
[string
$sJsURI = ""], [array
$aJsFiles = array()])
|
|
Prints the xajax Javascript header and wrapper code into your page by printing the output of the getJavascript() method. It should only be called between the
tags in your HTML page.
Remember, if you only want to obtain the result of this function, use xajax::getJavascript() instead. (executes Javascript include plugin)
Usage:
<head>
...
Parameters:
method processRequest [line 550]
This is the main communications engine of xajax. The engine handles all
incoming xajax requests, calls the apporiate PHP functions (or class/object methods) and passes the response back to the Javascript response handler. If your RequestURI is the same as your Web page then this function should be called before any headers or HTML has been sent. (executes request processor plugin)
method registerCallableObject [line 451]
void registerCallableObject(
&$oObject)
|
|
Registers an object whose methods will be searched for a match to the incoming request function name. If more than one callable object is registered, the first object that contains a method having the same name as the incoming function will be called.
Parameters:
method registerEvent [line 475]
void registerEvent(
mixed
$mCallback, string
$sEventName)
|
|
Registers a callback with an xajax event. Available events are:
- beforeProcessing -- triggered before the request is processed
- afterProcessing -- triggered after the request is processed
- onMissingFunction -- triggered if no function/method could be found
- onProcessingError -- triggered if there were an error during the
request processing
Parameters:
method registerFunction [line 425]
void registerFunction(
mixed
$mFunction, [string
$sIncludeFile = null])
|
|
Registers a PHP function or method to be callable through xajax in your
Javascript. If you want to register a function, pass in the name of that function. If you want to register a static class method, pass in an array like so: array("myFunctionName", "myClass", "myMethod") For an object instance method, use an object variable for the second array element (and in PHP 4 make sure you put an & before the variable to pass the object by reference). Note: the function name is what you call via Javascript, so it can be anything as long as it doesn't conflict with any other registered function name.
Usage: $xajax->registerFunction("myFunction"); or: $xajax->registerFunction(array("myFunctionName", &$myObject, "myMethod"));
Parameters:
method setCharEncoding [line 391]
void setCharEncoding(
string
$sEncoding)
|
|
Sets the character encoding for the HTTP output based on
$sEncoding, which is a string containing the character encoding to use. You don't need to use this method normally, since the character encoding for the response gets set automatically based on the XAJAX_DEFAULT_CHAR_ENCODING constant. Usage: $xajax->setCharEncoding("utf-8");
Parameters:
method setFlag [line 268]
void setFlag(
string
$name, boolean
$value)
|
|
Sets a flag (boolean true or false). Available flags with their defaults are as follows:
- debug: false
- statusMessages: false
- waitCursor: true
- exitAllowed: true
- errorHandler: false
- cleanBuffer: false
- decodeUTF8Input: false
- outputEntities: false
- allowBlankResponse: false
- allowAllResponseTypes: false
Parameters:
method setFlags [line 241]
void setFlags(
array
$flags)
|
|
Sets multiple flags based on the supplied associative array (see
xajax::setFlag() for flag names)
Parameters:
method setLogFile [line 365]
void setLogFile(
$sFilename)
|
|
Specifies a log file that will be written to by xajax during a request (used only by the error handling system at present). If you don't invoke this method, or you pass in "", then no log file will be written to.
Usage: $xajax->setLogFile("/xajax_logs/errors.log");
Parameters:
method setRequestURI [line 323]
void setRequestURI(
string
$sRequestURI)
|
|
Sets the URI to which requests will be made.
Usage: $xajax->setRequestURI("http://www.xajaxproject.org");
Parameters:
method setTimeout [line 301]
void setTimeout(
integer
$iTimeout)
|
|
Sets the timeout before xajax notifies the client that xajax has not been loaded
Usage: $xajax->setTimeout(6000);
Parameters:
method setWrapperPrefix [line 344]
void setWrapperPrefix(
string
$sPrefix)
|
|
Sets the prefix that will be appended to the Javascript wrapper functions (default is "xajax_").
Parameters: