Source for file ServerObserver.class.php

Documentation is available at ServerObserver.class.php

  1. <?php
  2. /**
  3. * XOAD Cache Server Observer file.
  4. *
  5. * <p>This file defines the {@link XOAD_Cache_ServerObserver} Class.</p>
  6. *
  7. * @author Stanimir Angeloff
  8. *
  9. * @package XOAD
  10. *
  11. * @subpackage XOAD_Cache
  12. *
  13. * @version 0.6.0.0
  14. *
  15. */
  16.  
  17. /**
  18. * XOAD Cache Server Observer Class.
  19. *
  20. * <p>This class is used by the {@link XOAD_Cache} extension
  21. * to process server events.</p>
  22. *
  23. * @author Stanimir Angeloff
  24. *
  25. * @package XOAD
  26. *
  27. * @subpackage XOAD_Cache
  28. *
  29. * @version 0.6.0.0
  30. *
  31. */
  32. class XOAD_Cache_ServerObserver extends XOAD_Observer
  33. {
  34. /**
  35. * This method is called after {@link XOAD_Server::notifyObservers}
  36. * is called.
  37. *
  38. * @access public
  39. *
  40. * @return bool Always true.
  41. *
  42. */
  43. function updateObserver($event, $arguments)
  44. {
  45. if ($event == 'initializeCallbackSuccess') {
  46.  
  47. if (array_key_exists('source', $arguments['request'])) {
  48.  
  49. if (XOAD_Cache::initialize($arguments['request'])) {
  50.  
  51. exit;
  52. }
  53. }
  54.  
  55. } else if ($event == 'dispatchLeave') {
  56.  
  57. if (array_key_exists('returnValue', $arguments['response'])) {
  58.  
  59. if (defined('XOAD_CACHE_REQUEST')) {
  60.  
  61. XOAD_Cache::cacheRequest($arguments['request'], $arguments['response']);
  62. }
  63. }
  64. }
  65.  
  66. return true;
  67. }
  68. }
  69. ?>

Documentation generated on Sat, 12 Nov 2005 20:24:46 +0200 by phpDocumentor 1.3.0RC3