/source/Plug-in/xajax/xajax_core/legacy.inc.php

http://prosporous.googlecode.com/ · PHP · 73 lines · 72 code · 1 blank · 0 comment · 2 complexity · 8051eba523f5d7855e16c41f8fdfd884 MD5 · raw file

  1. <?php
  2. class legacyXajaxResponse extends xajaxResponse {
  3. function outputEntitiesOn() { $this->setOutputEntities(true); }
  4. function outputEntitiesOff() { $this->setOutputEntities(false); }
  5. function addConfirmCommands() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'confirmCommands'), $temp); }
  6. function addAssign() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'assign'), $temp); }
  7. function addAppend() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'append'), $temp); }
  8. function addPrepend() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'prepend'), $temp); }
  9. function addReplace() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'replace'), $temp); }
  10. function addClear() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'clear'), $temp); }
  11. function addAlert() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'alert'), $temp); }
  12. function addRedirect() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'redirect'), $temp); }
  13. function addScript() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'script'), $temp); }
  14. function addScriptCall() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'call'), $temp); }
  15. function addRemove() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'remove'), $temp); }
  16. function addCreate() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'create'), $temp); }
  17. function addInsert() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'insert'), $temp); }
  18. function addInsertAfter() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'insertAfter'), $temp); }
  19. function addCreateInput() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'createInput'), $temp); }
  20. function addInsertInput() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'insertInput'), $temp); }
  21. function addInsertInputAfter() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'insertInputAfter'), $temp); }
  22. function addRemoveHandler() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'removeHandler'), $temp); }
  23. function addIncludeScript() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'includeScript'), $temp); }
  24. function addIncludeCSS() { $temp=func_get_args(); return call_user_func_array(array(&$this, 'includeCSS'), $temp); }
  25. function &getXML() { return $this; }
  26. }
  27. class legacyXajax extends xajax {
  28. function legacyXajax($sRequestURI='', $sWrapperPrefix='xajax_', $sEncoding=XAJAX_DEFAULT_CHAR_ENCODING, $bDebug=false)
  29. {
  30. parent::xajax();
  31. $this->configure('requestURI', $sRequestURI);
  32. $this->configure('wrapperPrefix', $sWrapperPrefix);
  33. $this->configure('characterEncoding', $sEncoding);
  34. $this->configure('debug', $bDebug);
  35. }
  36. function registerExternalFunction($mFunction, $sInclude)
  37. {
  38. $xuf =& new xajaxUserFunction($mFunction, $sInclude);
  39. $this->register(XAJAX_FUNCTION, $xuf);
  40. }
  41. function registerCatchAllFunction($mFunction)
  42. {
  43. if (is_array($mFunction)) array_shift($mFunction);
  44. $this->register(XAJAX_PROCESSING_EVENT, XAJAX_PROCESSING_EVENT_INVALID, $mFunction);
  45. }
  46. function registerPreFunction($mFunction)
  47. {
  48. if (is_array($mFunction)) array_shift($mFunction);
  49. $this->register(XAJAX_PROCESSING_EVENT, XAJAX_PROCESSING_EVENT_BEFORE, $mFunction);
  50. }
  51. function canProcessRequests() { return $this->canProcessRequest(); }
  52. function processRequests() { return $this->processRequest(); }
  53. function setCallableObject(&$oObject) { return $this->register(XAJAX_CALLABLE_OBJECT, $oObject); }
  54. function debugOn() { return $this->configure('debug',true); }
  55. function debugOff() { return $this->configure('debug',false); }
  56. function statusMessagesOn() { return $this->configure('statusMessages',true); }
  57. function statusMessagesOff() { return $this->configure('statusMessages',false); }
  58. function waitCursorOn() { return $this->configure('waitCursor',true); }
  59. function waitCursorOff() { return $this->configure('waitCursor',false); }
  60. function exitAllowedOn() { return $this->configure('exitAllowed',true); }
  61. function exitAllowedOff() { return $this->configure('exitAllowed',false); }
  62. function errorHandlerOn() { return $this->configure('errorHandler',true); }
  63. function errorHandlerOff() { return $this->configure('errorHandler',false); }
  64. function cleanBufferOn() { return $this->configure('cleanBuffer',true); }
  65. function cleanBufferOff() { return $this->configure('cleanBuffer',false); }
  66. function decodeUTF8InputOn() { return $this->configure('decodeUTF8Input',true); }
  67. function decodeUTF8InputOff() { return $this->configure('decodeUTF8Input',false); }
  68. function outputEntitiesOn() { return $this->configure('outputEntities',true); }
  69. function outputEntitiesOff() { return $this->configure('outputEntities',false); }
  70. function allowBlankResponseOn() { return $this->configure('allowBlankResponse',true); }
  71. function allowBlankResponseOff() { return $this->configure('allowBlankResponse',false); }
  72. }