/config/najax.config.php

Description

NAJAX Configuration file.

This file contains most of the available NAJAX configuration options.

You can modify this file, but you should be aware that NAJAX is only tested with the default configuration.

Constants
NAJAX_CLIENT_METADATA_METHOD_NAME = 'najaxGetMeta' (line 87)

Defines the method name that is called when NAJAX needs more information about an object.

Every class that you will register with NAJAX_Client should implement this method to provide more information about its methods and variables.

Example:

  1. <script type="text/javascript">
  2. <?php
  3.  
  4. class MetaExample
  5. {
  6. var $privateVar;
  7. var $publicVar;
  8.  
  9. function PrivateMethod() {}
  10. function PublicMethod() {}
  11.  
  12. function najaxGetMeta()
  13. {
  14. NAJAX_Client::privateMethods($this, array('PrivateMethod'));
  15.  
  16. NAJAX_Client::privateVariables($this, array('privateVar'));
  17.  
  18. NAJAX_Client::mapMethods($this, array('PublicMethod'));
  19. }
  20. }
  21.  
  22. require_once('najax.php');
  23.  
  24. print NAJAX_Client::register('MetaExample', 'server.php');
  25.  
  26. ?>
  27. </script>

NAJAX_EVENTS_LIFETIME = 60*2 (line 115)

Defines the default lifetime for an event.

The default value is 2 minutes. Please note, that the lifetime should be between 30 seconds and 5 minutes for performance reasons.

NAJAX_EVENTS_STORAGE_DSN = 'MySQL://server=?;user=?;password=?;database=?' (line 103)

Defines the data source name and parameters to use when event's information is saved.

DSN Examples:

  1. File://c:/events.txt
  2. MySQL:

NAJAX_SERIALIZER_SKIP_STRING = '<![najaxSerializer:skipString[' (line 43)

Defines the prefix that is used to indicate the Serializer to skip string serialization.

Example:

  1. <?php
  2.  
  3. require_once('najax.php');
  4.  
  5. $arr = array(1, 2, NAJAX_SERIALIZER_SKIP_STRING . 'function skip() { alert("skip."); }');
  6.  
  7. ?>
  8. <script type="text/javascript">
  9.  
  10. var arr = <?= NAJAX_Serializer::serialize($arr) ?>;
  11.  
  12. arr[2]();
  13.  
  14. </script>

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