/[cvs]/nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php

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

revision 1.18 by jonen, Thu May 13 19:17:55 2004 UTC revision 1.19 by joko, Mon Jun 7 16:56:45 2004 UTC
# Line 18  Line 18 
18   *    $Id$   *    $Id$
19   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
20   *    $Log$   *    $Log$
21     *    Revision 1.19  2004/06/07 16:56:45  joko
22     *    enabled caching-layers
23     *    minor fixes regarding caching
24     *
25   *    Revision 1.18  2004/05/13 19:17:55  jonen   *    Revision 1.18  2004/05/13 19:17:55  jonen
26   *    + bugfix: utf8 conversion was missing at some backend-calls   *    + bugfix: utf8 conversion was missing at some backend-calls
27   *   *
# Line 281  class DesignPattern_RemoteProxy extends Line 285  class DesignPattern_RemoteProxy extends
285    var $backend;    var $backend;
286    
287    function DesignPattern_RemoteProxy($objectId = "", $options = array() ) {    function DesignPattern_RemoteProxy($objectId = "", $options = array() ) {
288      php::log(get_class($this) . "->new()", PEAR_LOG_INFO);      php::log(get_class($this) . "->new(objectId=$objectId)", PEAR_LOG_INFO);
289      global $proxy;      global $proxy;
290    
291      // 2003-03-05 - modified constructor      // 2003-03-05 - modified constructor
# Line 421  class DesignPattern_RemoteProxy extends Line 425  class DesignPattern_RemoteProxy extends
425    function _loadState() {    function _loadState() {
426      global $proxy;      global $proxy;
427    
428        // just do session-caching if requested
429        if (!$this->meta[cache][session]) { return; }
430    
431      // trace      // trace
432        //print Dumper($this);        //print Dumper($this);
433    
# Line 431  class DesignPattern_RemoteProxy extends Line 438  class DesignPattern_RemoteProxy extends
438        //print "_loadState:" . dumpVar($this->attributes);        //print "_loadState:" . dumpVar($this->attributes);
439        $this->meta[decoded] = 1;        $this->meta[decoded] = 1;
440        // TODO: make a parameter from this (0 deactivates session-layer)        // TODO: make a parameter from this (0 deactivates session-layer)
441        return 0;        return 1;
442      }      }
443    }    }
444    
445    function _saveState() {    function _saveState() {
446      global $proxy;      global $proxy;
447        
448        // just do session-caching if requested
449        if (!$this->meta[cache][session]) { return; }
450        
451      php::log(get_class($this) . "->_saveState()");      php::log(get_class($this) . "->_saveState()");
452      $proxy[$this->objectId] = $this->attributes;      $proxy[$this->objectId] = $this->attributes;
453      //print "_saveState: " . dumpVar($this->attributes);      //print "_saveState: " . dumpVar($this->attributes);
# Line 459  class DesignPattern_RemoteProxy extends Line 470  class DesignPattern_RemoteProxy extends
470        if ($row) {        if ($row) {
471          $this->payload = $row[payload];          $this->payload = $row[payload];
472          // TODO: make a parameter from this (0 deactivates mysqldb-layer)          // TODO: make a parameter from this (0 deactivates mysqldb-layer)
473          return 0;          return 1;
474        }        }
475      }      }
476    }    }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed