Source for file najax.config.php

Documentation is available at najax.config.php

  1. <?php
  2. /**
  3. * NAJAX Configuration file.
  4. *
  5. * <p>This file contains most of the available NAJAX
  6. * configuration options.</p>
  7. * <p>You can modify this file, but you should be aware
  8. * that NAJAX is only tested with the default
  9. * configuration.</p>
  10. *
  11. * @author Stanimir Angeloff
  12. *
  13. * @package NAJAX
  14. *
  15. * @version 0.4.1.0
  16. *
  17. */
  18.  
  19. if ( ! defined('NAJAX_SERIALIZER_SKIP_STRING')) {
  20.  
  21. /**
  22. * Defines the prefix that is used to indicate the
  23. * Serializer to skip string serialization.
  24. *
  25. * <p>Example:</p>
  26. * <code>
  27. * <?php
  28. *
  29. * require_once('najax.php');
  30. *
  31. * $arr = array(1, 2, NAJAX_SERIALIZER_SKIP_STRING . 'function skip() { alert("skip."); }');
  32. *
  33. * ?>
  34. * <script type="text/javascript">
  35. *
  36. * var arr = <?= NAJAX_Serializer::serialize($arr) ?>;
  37. *
  38. * arr[2]();
  39. *
  40. * </script>
  41. * </code>
  42. */
  43. define('NAJAX_SERIALIZER_SKIP_STRING', '<![najaxSerializer:skipString[');
  44. }
  45.  
  46. if ( ! defined('NAJAX_CLIENT_METADATA_METHOD_NAME')) {
  47.  
  48. /**
  49. * Defines the method name that is called when NAJAX
  50. * needs more information about an object.
  51. *
  52. * <p>Every class that you will register with {@link NAJAX_Client}
  53. * should implement this method to provide more information
  54. * about its methods and variables.</p>
  55. * <p>Example:</p>
  56. * <code>
  57. * <script type="text/javascript">
  58. * <?php
  59. *
  60. * class MetaExample
  61. * {
  62. * var $privateVar;
  63. * var $publicVar;
  64. *
  65. * function PrivateMethod() {}
  66. * function PublicMethod() {}
  67. *
  68. * function najaxGetMeta()
  69. * {
  70. * NAJAX_Client::privateMethods($this, array('PrivateMethod'));
  71. *
  72. * NAJAX_Client::privateVariables($this, array('privateVar'));
  73. *
  74. * NAJAX_Client::mapMethods($this, array('PublicMethod'));
  75. * }
  76. * }
  77. *
  78. * require_once('najax.php');
  79. *
  80. * print NAJAX_Client::register('MetaExample', 'server.php');
  81. *
  82. * ?>
  83. * </script>
  84. * </code>
  85. *
  86. */
  87. define('NAJAX_CLIENT_METADATA_METHOD_NAME', 'najaxGetMeta');
  88. }
  89.  
  90. if ( ! defined('NAJAX_EVENTS_STORAGE_DSN')) {
  91.  
  92. /**
  93. * Defines the data source name and parameters to use
  94. * when event's information is saved.
  95. *
  96. * <p>DSN Examples:</p>
  97. * <code>
  98. * File://c:/events.txt
  99. * MySQL://server=?;user=?;password=?;database=?;[port=?]
  100. * </code>
  101. *
  102. */
  103. define('NAJAX_EVENTS_STORAGE_DSN', 'MySQL://server=?;user=?;password=?;database=?');
  104. }
  105.  
  106. if ( ! defined('NAJAX_EVENTS_LIFETIME')) {
  107.  
  108. /**
  109. * Defines the default lifetime for an event.
  110. *
  111. * <p>The default value is 2 minutes. Please note, that
  112. * the lifetime should be between 30 seconds and 5 minutes
  113. * for performance reasons.</p>
  114. */
  115. define('NAJAX_EVENTS_LIFETIME', 60 * 2);
  116. }
  117.  
  118. ?>

Documentation generated on Tue, 20 Sep 2005 21:40:13 +0300 by phpDocumentor 1.3.0RC3