Class OCSP_AJAX

Description

Class OCSP_AJAX

this class is designed to handle ajex requests

Located in /ajax/OCSP_AJAX.phpclass (line 55)

OCSP_OBJ
   |
   --OCSP_AJAX
Direct descendents
Class Description
 class OCSP_AJAXFORM Class OCSP_AJAXFORM
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
 array $functionLst
 boolean $isCachable
 string $jsAction
 string $jsCode
 string $myCacheType
 string $objId
 array $valueLst
Method Summary
 static void isAjaxCall ()
 static void isjOCSPLoad ()
 void addJsCode (string $aCode)
 boolean cacheLoad ([string $cacheType = 'session'], [boolean $debug = FALSE])
 void cacheStore ([boolean $debug = FALSE])
 OCSP_AJAX OCSP_AJAX ([ $aId = ""], [ $funcInc = ""], [ $debug = FALSE])
 void enableCache ([string $cacheType = 'session'])
 string getActionUri ()
 OCSP_AJAX_FUNCTION &getFunction (string $func_name)
 string getJsCode ()
 string get_objId ([boolean $debug = FALSE])
 string js_esc (string $val)
 string js_getFuncArgList (array $argList)
 string js_getFunctionCode ([boolean $debug = FALSE])
 string js_getNewFuncArg (string $varName, mixed $value)
 void js_getScript ([boolean $debug = FALSE])
 OCSP_AJAX_FUNC_FRMSUBMIT &registerFormSubmit (string $func_name, string $frmName, string $func_include, [array $func_args = NULL], [string $rq_methode = OCSP_AJAX_RQMODE_POST], [boolean $debug = FALSE])
 OCSP_AJAX_FUNCTION &registerFunction (string $func_name, [string $func_include = ""], [array $func_args = NULL], [string $rq_methode = OCSP_AJAX_RQMODE_GET], [boolean $debug = FALSE])
 void setActionUri (string $rqUrl)
 void setHTTPheader ([string $contentType = "text/javascript"], [string $charset = "UTF-8"])
 void set_objId (string $aId)
Variables
array $done_funcLst = array() (line 100)
  • var: the functions available (registered)
  • access: protected
array $functionLst = array() (line 92)
  • var: the functions available (registered)
  • access: protected
boolean $isCachable = FALSE (line 138)
  • access: protected
string $jsAction = "" (line 119)
  • var: the action used
  • access: protected

Redefined in descendants as:
string $jsCode = "" (line 126)
  • var: aditional code to include in on the page
  • since: pk-07-09-18
  • access: protected
array $myCacheObjects = array() (line 157)

array of cached objects

  • since: pk-07-03-18
  • access: protected
string $myCacheType = 'session' (line 149)

where to cache the object possible settings are:

  • session (cache the object data to the session)

  • since: pk-07-03-18
  • access: protected
string $myClassSrcFile = __FILE__ (line 132)
  • access: protected
string $objId = "" (line 106)
  • var: the id of the ajax object
  • access: protected
array $valueLst = array() (line 113)
  • var: values the functions uses
  • access: protected

Inherited Variables

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$myDBObj
OCSP_OBJ::$staticClassVars
Methods
static isAjaxCall (line 69)

* class methods ---------------------------------------------

  • access: public
void isAjaxCall ()
static isjOCSPLoad (line 74)
  • access: public
void isjOCSPLoad ()
addJsCode (line 231)
  • since: pk-07-09-18
  • access: public
void addJsCode (string $aCode)
  • string $aCode
cacheLoad (line 510)

loads the cached data

  • todo: OCSP_AJAX::cacheLoad() use ocsp session
  • since: pk-07-03-18
  • access: public
boolean cacheLoad ([string $cacheType = 'session'], [boolean $debug = FALSE])
  • string $cacheType
  • boolean $debug
cacheStore (line 480)

writes the cache

  • todo: OCSP_AJAX::cacheStore() use ocsp session
  • since: pk-07-03-18
  • access: public
void cacheStore ([boolean $debug = FALSE])
  • boolean $debug
Constructor OCSP_AJAX (line 163)
OCSP_AJAX OCSP_AJAX ([ $aId = ""], [ $funcInc = ""], [ $debug = FALSE])
  • $aId
  • $funcInc
  • $debug
enableCache (line 460)

enables the object caching

  • since: pk-07-03-18
  • access: public
void enableCache ([string $cacheType = 'session'])
  • string $cacheType: cacheType
getActionUri (line 210)
  • access: public
string getActionUri ()
getFunction (line 260)

retuns a registered function or an pointer to an empty function in $this::functionLst

  • access: public
OCSP_AJAX_FUNCTION &getFunction (string $func_name)
  • string $func_name
getJsCode (line 241)
  • return: (js)
  • since: pk-07-09-18
  • access: public
string getJsCode ()
get_objId (line 188)

returns the object ID if $this->objId is empty $_SERVER['UNIQUE

if you use a special class to handle the ajax requests overwrite this methode

  • access: public
string get_objId ([boolean $debug = FALSE])
  • boolean $debug
js_esc (line 323)

javascript escape a value

string js_esc (string $val)
  • string $val
js_getFuncArgList (line 415)

returns the javascript code for an ajax function argument list

string js_getFuncArgList (array $argList)
  • array $argList: (array(varName => value))
js_getFunctionCode (line 337)

returns the js code for the function List

  • return: (javascript code)
  • since: pk-07-08-20
string js_getFunctionCode ([boolean $debug = FALSE])
  • boolean $debug
js_getNewFuncArg (line 397)

returns the javascript code for an ajax function argument

string js_getNewFuncArg (string $varName, mixed $value)
  • string $varName
  • mixed $value
js_getScript (line 377)

returns the javascript for the object

  • access: public
void js_getScript ([boolean $debug = FALSE])
  • boolean $debug
registerFormSubmit (line 302)

register a form submit

  • access: public
OCSP_AJAX_FUNC_FRMSUBMIT &registerFormSubmit (string $func_name, string $frmName, string $func_include, [array $func_args = NULL], [string $rq_methode = OCSP_AJAX_RQMODE_POST], [boolean $debug = FALSE])
  • string $func_name: name of the php function to call
  • string $frmName: name of the formular (document.forms['$frmName'])
  • string $func_include: include file containing the $func_name
  • array $func_args: argument array to submit too
  • string $rq_methode: request methode (GET|POST)
  • boolean $debug
registerFunction (line 279)

register a function

  • access: public
OCSP_AJAX_FUNCTION &registerFunction (string $func_name, [string $func_include = ""], [array $func_args = NULL], [string $rq_methode = OCSP_AJAX_RQMODE_GET], [boolean $debug = FALSE])
  • string $func_name: name of the php function to call
  • string $func_include: include file containing the $func_name
  • array $func_args: argument array to submit too
  • string $rq_methode: request methode (GET|POST)
  • boolean $debug
setActionUri (line 221)

sets the action uri (where the request is sent)

  • since: pk-07-04-19
  • access: public
void setActionUri (string $rqUrl)
  • string $rqUrl
setHTTPheader (line 437)

sets the http header for the ajax return

void setHTTPheader ([string $contentType = "text/javascript"], [string $charset = "UTF-8"])
  • string $contentType
  • string $charset
set_objId (line 201)
  • access: public
void set_objId (string $aId)
  • string $aId

Inherited Methods

Inherited From OCSP_OBJ

 OCSP_OBJ::castObj()
 OCSP_OBJ::cloneMe()
 OCSP_OBJ::currentUser()
 OCSP_OBJ::dbConnect()
 OCSP_OBJ::defaultDBObj()
 OCSP_OBJ::defaultReadDBObj()
 OCSP_OBJ::defaultWriteDBObj()
 OCSP_OBJ::getConf()
 OCSP_OBJ::getDBObj()
 OCSP_OBJ::get_myClassConstant()
 OCSP_OBJ::get_myObject_vars()
 OCSP_OBJ::get_mySourceFile()
 OCSP_OBJ::isConnected()
 OCSP_OBJ::isMultiByteStr()
 OCSP_OBJ::isUTF8()
 OCSP_OBJ::setConf()
 OCSP_OBJ::setDBObj()
 OCSP_OBJ::set_myObject_vars()
 OCSP_OBJ::set_myVarsFrom()
Class Constants
CLASS_SRC_FILE = __FILE__ (line 62)

Inherited Constants

Inherited from OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

Documentation generated on Thu, 08 Jan 2009 17:45:06 +0100 by phpDocumentor 1.4.0a2