/[drupal]/contributions/modules/amfphp/amfphp.module
ViewVC logotype

Diff of /contributions/modules/amfphp/amfphp.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3.2.3 by snelson, Sat Feb 10 19:58:51 2007 UTC revision 1.3.2.4 by snelson, Sun Jul 15 06:56:16 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: amfphp.module,v 1.4 2007/01/20 07:09:25 snelson Exp $  // $Id: amfphp.module,v 1.6 2007/07/15 06:48:53 snelson Exp $
3    
4  /*  /*
5   * Implementation of hook_requirements()   * Implementation of hook_requirements()
# Line 15  function amfphp_requirements($phase) { Line 15  function amfphp_requirements($phase) {
15    
16    if (!file_exists(realpath(dirname(__FILE__) . '/amfphp/core/amf/app/Gateway.php'))) {    if (!file_exists(realpath(dirname(__FILE__) . '/amfphp/core/amf/app/Gateway.php'))) {
17      $requirements['amfphp']['value'] = $t('Not found');      $requirements['amfphp']['value'] = $t('Not found');
18      $requirements['amfphp']['description'] = $t('You must dowload <a href="http://www.5etdemi.com/blog/archives/2006/12/amfphp-19-beta-get-it-now/">AMFPHP 1.9 beta</a> or newer, and place in the amfphp module folder.');      $requirements['amfphp']['description'] = $t('You must dowload <a href="http://www.5etdemi.com/blog/archives/2006/12/amfphp-19-beta-get-it-now/">AMFPHP 1.9 beta</a> or newer, and place inside the amfphp module folder.');
19      $requirements['amfphp']['severity'] = REQUIREMENT_ERROR;      $requirements['amfphp']['severity'] = REQUIREMENT_ERROR;
20    }    }
21    
# Line 37  function amfphp_server_info() { Line 37  function amfphp_server_info() {
37   * here we include the contents of a gateway.php   * here we include the contents of a gateway.php
38   */   */
39  function amfphp_server() {  function amfphp_server() {
40          require_once drupal_get_path('module', 'amfphp') . "/overrides/AmfphpGateway.php";    $path = drupal_get_path('module', 'amfphp');
41          $gateway = new AmfphpGateway();    define("PRODUCTION_SERVER", variable_get('services_debug', FALSE));
42    
43          // settings          require_once $path . "/amfphp/globals.php";
44          $gateway->setLooseMode(true);          require_once $path . "/overrides/AmfphpGateway.php";
45    
46            $gateway = new AmfphpGateway();
47            $gateway->setClassPath($servicesPath);
48            $gateway->setClassMappingsPath($voPath);
49            $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
50          $gateway->setErrorHandling(E_ALL ^ E_NOTICE);          $gateway->setErrorHandling(E_ALL ^ E_NOTICE);
         $gateway->setAmf3RecordSetFormat("ArrayCollection");  
51    
52          // is production?          if(PRODUCTION_SERVER)
53          if(variable_get('services_debug', FALSE)) {          {
                 $gateway->disableTrace();  
54                  $gateway->disableDebug();                  $gateway->disableDebug();
                 $gateway->disableServiceDescription();  
55          }          }
56    
57    // adapter mappings          $gateway->enableGzipCompression(25*1024);
         $gateway->addAdapterMapping('arrayf', 'arrayf');  
   $gateway->addAdapterMapping('arrayft', 'arrayft');  
   
         // start service  
58          $gateway->service();          $gateway->service();
59  }  }
60    

Legend:
Removed from v.1.3.2.3  
changed lines
  Added in v.1.3.2.4

  ViewVC Help
Powered by ViewVC 1.1.3