/** * Handle a client request, either generating a client or having HTML_AJAX handle the request * * @return boolean true if request was handled, false otherwise */ function handleRequest() { if ($this->options == true) { $this->_loadOptions(); } //basically a hook for iframe but allows processing of data earlier $this->ajax->populatePayload(); if (!isset($_GET['c']) && (count($this->options['client']) > 0 || count($this->options['stub']) > 0)) { $this->generateClient(); return true; } else { if (!empty($_GET['c'])) { $this->_init($this->_cleanIdentifier($this->ajax->_getVar('c'))); } return $this->ajax->handleRequest(); } }
* * @category HTML * @package AJAX * @author Joshua Eichorn <*****@*****.**> * @copyright 2005 Joshua Eichorn * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: 0.5.6 * @link http://pear.php.net/package/HTML_AJAX */ include 'HTML/AJAX.php'; include '../support/test.class.php'; $ajax = new HTML_AJAX(); $ajax->serializer = "Null"; $ajax->unserializer = "Null"; $ajax->registerClass(new test()); if ($ajax->handleRequest()) { die; } ?> <html> <head> <script type='text/javascript' src="../server.php?client=all&stub=all"></script> </head> <body> <script type="text/javascript"> var t = new test(); var t2 = new test({echo_string: function(){ endCall('Async Echo'); totalA(); }}); var time1; var total = 0;