Pajax

Main Class for Pajax system Create JavaScript stubs and takes care of class loading of php objects

Summary
Main Class for Pajax system Create JavaScript stubs and takes care of class loading of php objects
Dynamically load a class file
Determines if a class can be invoked remotly
Return the JavaScript stub class equivalent for a php class

Functions

Pajax

function Pajax($uriPath = "/pajax/",
$dispatcher = "pajax_call_dispatcher.php",
$classPath = "..:../test")

Parameters

uriPathURI path to the pajax system
dispatcherName of the script used by the http callback
classPathPaths of remote class, seperated by “:”

loadClass

function loadClass($className)

Dynamically load a class file

Parameters

classNameClass to be loaded.  It will look for a file that is sufixed by “.class.php”

Returns

trueClass loaded successfully
falseFailed to load class

isRemotable

function isRemotable($className)

Determines if a class can be invoked remotly

Parameters

classNameClass name to check.  It expects the class to be loaded already

Returns

trueClass is a subclass of PajaxRemote
falseOtherwise

getJavaScriptStub

function getJavaScriptStub($className)

Return the JavaScript stub class equivalent for a php class

Parameters

classNameClass name to build stub for.  It expects the class to be loaded already.

Returns

String contain JavaScript stub for the Class.  If the class is not remotable, it will return a string with an error surrounded by html comments tag.

function Pajax($uriPath = "/pajax/",
$dispatcher = "pajax_call_dispatcher.php",
$classPath = "..:../test")
function loadClass($className)
Dynamically load a class file
function isRemotable($className)
Determines if a class can be invoked remotly
function getJavaScriptStub($className)
Return the JavaScript stub class equivalent for a php class