Source for file xoad.php

Documentation is available at xoad.php

  1. <?php
  2. /**
  3. * XOAD all-in-one file.
  4. *
  5. * <p>This file includes all configuration files and
  6. * classes that the XOAD package contains.</p>
  7. * <p>The file also includes all installed
  8. * extensions.</p>
  9. *
  10. * @author Stanimir Angeloff
  11. *
  12. * @package XOAD
  13. *
  14. * @version 0.6.0.0
  15. *
  16. */
  17.  
  18. if ( ! defined('XOAD_BASE')) {
  19.  
  20. /**
  21. * XOAD base folder that contains all package files.
  22. */
  23. define('XOAD_BASE', dirname(__FILE__));
  24. }
  25.  
  26. /**
  27. * Loads the XOAD configuration file.
  28. */
  29. require_once(XOAD_BASE . '/config/xoad.config.php');
  30.  
  31. /**
  32. * Loads the XOAD extensions configuration file.
  33. */
  34. require_once(XOAD_BASE . '/config/extensions.config.php');
  35.  
  36. /**
  37. * Loads the file that defines the {@link XOAD_Observer} Class.
  38. */
  39. require_once(XOAD_BASE . '/classes/Observer.class.php');
  40.  
  41. /**
  42. * Loads the class that is used to extend classes with events.
  43. */
  44. require_once(XOAD_BASE . '/classes/Observable.class.php');
  45.  
  46. /**
  47. * Loads the class that defines extended functions that
  48. * the XOAD package uses and overrides some
  49. * deprecated functions, like gettype(...).
  50. */
  51. require_once(XOAD_BASE . '/classes/Utilities.class.php');
  52.  
  53. /**
  54. * Loads the class that is used to serialize a PHP variable
  55. * into a {@link http://www.json.org JSON} string.
  56. */
  57. require_once(XOAD_BASE . '/classes/Serializer.class.php');
  58.  
  59. /**
  60. * Loads the class that is used to register a PHP variable/class
  61. * in JavaScript.
  62. */
  63. require_once(XOAD_BASE . '/classes/Client.class.php');
  64.  
  65. /**
  66. * Loads the class that is used as base class for all
  67. * XOAD Events storage providers.
  68. */
  69. require_once(XOAD_BASE .'/classes/events/Storage.class.php');
  70.  
  71. /**
  72. * Loads the class that is used to handle client callbacks.
  73. */
  74. require_once(XOAD_BASE . '/classes/Server.class.php');
  75.  
  76. if ( ! empty($xoadExtensions)) {
  77.  
  78. foreach ($xoadExtensions as $extension) {
  79.  
  80. /**
  81. * XOAD extension base folder that contains all extension files.
  82. */
  83. define('XOAD_' . strtoupper($extension) . '_BASE', XOAD_BASE . '/extensions/' . $extension);
  84.  
  85. /**
  86. * Loads the main extension file.
  87. */
  88. require_once(XOAD_BASE . '/extensions/' . $extension . '/' . $extension . '.ext.php');
  89. }
  90. }
  91.  
  92. if (defined('XOAD_AUTOHANDLE')) {
  93.  
  94. if (XOAD_AUTOHANDLE) {
  95.  
  96. XOAD_Server::runServer();
  97.  
  98. if (defined('XOAD_CALLBACK')) {
  99.  
  100. if (XOAD_CALLBACK) {
  101.  
  102. exit;
  103. }
  104. }
  105. }
  106. }
  107. ?>

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