/[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.20 by joko, Sun Jun 20 23:03:34 2004 UTC
# Line 18  Line 18 
18   *    $Id$   *    $Id$
19   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
20   *    $Log$   *    $Log$
21     *    Revision 1.20  2004/06/20 23:03:34  joko
22     *    minor fix: don't resolve result-status as "good", if server-status contains errors
23     *
24     *    Revision 1.19  2004/06/07 16:56:45  joko
25     *    enabled caching-layers
26     *    minor fixes regarding caching
27     *
28   *    Revision 1.18  2004/05/13 19:17:55  jonen   *    Revision 1.18  2004/05/13 19:17:55  jonen
29   *    + bugfix: utf8 conversion was missing at some backend-calls   *    + bugfix: utf8 conversion was missing at some backend-calls
30   *   *
# Line 281  class DesignPattern_RemoteProxy extends Line 288  class DesignPattern_RemoteProxy extends
288    var $backend;    var $backend;
289    
290    function DesignPattern_RemoteProxy($objectId = "", $options = array() ) {    function DesignPattern_RemoteProxy($objectId = "", $options = array() ) {
291      php::log(get_class($this) . "->new()", PEAR_LOG_INFO);      php::log(get_class($this) . "->new(objectId=$objectId)", PEAR_LOG_INFO);
292      global $proxy;      global $proxy;
293    
294      // 2003-03-05 - modified constructor      // 2003-03-05 - modified constructor
# Line 421  class DesignPattern_RemoteProxy extends Line 428  class DesignPattern_RemoteProxy extends
428    function _loadState() {    function _loadState() {
429      global $proxy;      global $proxy;
430    
431        // just do session-caching if requested
432        if (!$this->meta[cache][session]) { return; }
433    
434      // trace      // trace
435        //print Dumper($this);        //print Dumper($this);
436    
# Line 431  class DesignPattern_RemoteProxy extends Line 441  class DesignPattern_RemoteProxy extends
441        //print "_loadState:" . dumpVar($this->attributes);        //print "_loadState:" . dumpVar($this->attributes);
442        $this->meta[decoded] = 1;        $this->meta[decoded] = 1;
443        // TODO: make a parameter from this (0 deactivates session-layer)        // TODO: make a parameter from this (0 deactivates session-layer)
444        return 0;        return 1;
445      }      }
446    }    }
447    
448    function _saveState() {    function _saveState() {
449      global $proxy;      global $proxy;
450        
451        // just do session-caching if requested
452        if (!$this->meta[cache][session]) { return; }
453        
454      php::log(get_class($this) . "->_saveState()");      php::log(get_class($this) . "->_saveState()");
455      $proxy[$this->objectId] = $this->attributes;      $proxy[$this->objectId] = $this->attributes;
456      //print "_saveState: " . dumpVar($this->attributes);      //print "_saveState: " . dumpVar($this->attributes);
# Line 459  class DesignPattern_RemoteProxy extends Line 473  class DesignPattern_RemoteProxy extends
473        if ($row) {        if ($row) {
474          $this->payload = $row[payload];          $this->payload = $row[payload];
475          // TODO: make a parameter from this (0 deactivates mysqldb-layer)          // TODO: make a parameter from this (0 deactivates mysqldb-layer)
476          return 0;          return 1;
477        }        }
478      }      }
479    }    }
# Line 541  class DesignPattern_RemoteProxy extends Line 555  class DesignPattern_RemoteProxy extends
555      $status = $this->backend->status();      $status = $this->backend->status();
556      //print Dumper($status);      //print Dumper($status);
557            
558      $good = is_array($result) && sizeof($result) && $status[connected];      $good = !$status[errors] && is_array($result) && sizeof($result) && $status[connected];
559    
560      if ($good) {      if ($good) {
561                

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

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