AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Source for file interceptorServer.php

Documentation is available at interceptorServer.php

  1. <?php
  2. /**
  3.  * HTML_AJAX_Server with a register itnerceptor class
  4.  *
  5.  * The server responds to ajax calls and also serves the js client libraries, so they can be used directly from the PEAR data dir
  6.  * 304 not modified headers are used when server client libraries so they will be cached on the browser reducing overhead
  7.  *
  8.  * @category   HTML
  9.  * @package    AJAX
  10.  * @author     Joshua Eichorn <josh@bluga.net>
  11.  * @copyright  2007 Joshua Eichorn
  12.  * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
  13.  * @version    Release: 0.5.4
  14.  * @link       http://pear.php.net/package/HTML_AJAX
  15.  */
  16.  
  17.  // include the server class
  18. include 'HTML/AJAX/Server.php';
  19.  
  20. // include the test class will be registering
  21.     include 'support/test.class.php';
  22.     include 'support/test2.class.php';
  23.     include 'support/interceptor.php';
  24.  
  25. // create our new server
  26. $server = new HTML_AJAX_Server();
  27.  
  28. // register an instance of the class were registering
  29. $test = new test();
  30. $server->registerClass($test,'test');
  31.  
  32. $test2 = new test2();
  33. $server->registerClass($test2,'test2');
  34.  
  35. $server->ajax->packJavaScript = true;
  36.  
  37. $server->ajax->setInterceptor(new Interceptor());
  38.  
  39. $server->handleRequest();
  40. ?>

Documentation generated on Fri, 04 Apr 2008 18:30:18 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.