/[cvs]/nfo/php/libs/org.netfrag.flib/Application/RPC/ProxyObject.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Application/RPC/ProxyObject.php

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

revision 1.5 by jonen, Wed Dec 18 22:36:49 2002 UTC revision 1.6 by jonen, Sun Dec 22 13:26:20 2002 UTC
# Line 3  Line 3 
3  ##    $Id$  ##    $Id$
4  ##    -------------------------------------------------------------------------------------  ##    -------------------------------------------------------------------------------------
5  ##    $Log$  ##    $Log$
6    ##    Revision 1.6  2002/12/22 13:26:20  jonen
7    ##    + added support of tangram independent id (e.g. Data::UUID) toggled by option at conrtuctor
8    ##
9  ##    Revision 1.5  2002/12/18 22:36:49  jonen  ##    Revision 1.5  2002/12/18 22:36:49  jonen
10  ##    + added support to get remote objects via backend via 'guid'  ##    + added support to get remote objects via backend via 'guid'
11  ##    + renamed '_loadBackend' to '_loadRemote'  ##    + renamed '_loadBackend' to '_loadRemote'
# Line 224  class ProxyObject { Line 227  class ProxyObject {
227      // check for guid or oid      // check for guid or oid
228      if($this->meta[guid]) {      if($this->meta[guid]) {
229        $args = array( guid => $this->objectId, classname => $this->meta[classname] );        $args = array( guid => $this->objectId, classname => $this->meta[classname] );
230        $result = $this->backend->call('getObjectByGuid', $args );        $result = $this->backend->send('getObjectByGuid', $args );
231      }      }
232      if($this->meta[oid]) {      if($this->meta[oid]) {
233        $result = $this->backend->call('getObject', $this->objectId);        $result = $this->backend->send('getObject', $this->objectId);
234      }      }
235            
236      if ($result) {      if ($result) {
# Line 254  class ProxyObject { Line 257  class ProxyObject {
257        
258    function _saveBackend($result) {    function _saveBackend($result) {
259      logp(get_class($this) . "->_saveBackend()", LOG_DEBUG);      logp(get_class($this) . "->_saveBackend()", LOG_DEBUG);
260      $encoder = new TextEncode($result);  
261      $encoder->toUTF8();      //$encoder = new TextEncode($result);
262      $response = $this->backend->send('saveObject', array('oid' => $this->objectId, 'data' => $result) );      //$encoder->toUTF8();
263    
264        // check for guid or oid
265        if($this->meta[guid]) {
266          $args = array( 'guid' => $this->objectId, 'classname' => $this->meta[classname], 'data' => $result );
267          $response = $this->backend->send('saveObjectByGuid', $args, array( utf8 => 1) );
268        }
269        if($this->meta[oid]) {
270          $response = $this->backend->send('saveObject', array('oid' => $this->objectId, 'data' => $result), array( utf8 => 1)  );
271        }
272    }    }
273    
274    function _decode() {    function _decode() {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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