| 3 | 
 //  $Id$ | 
 //  $Id$ | 
| 4 | 
 // --------------------------------------------------------------------------- | 
 // --------------------------------------------------------------------------- | 
| 5 | 
 //  $Log$ | 
 //  $Log$ | 
| 6 | 
  | 
 //  Revision 1.6  2003/03/05 11:59:34  joko | 
| 7 | 
  | 
 //  renamed method | 
| 8 | 
  | 
 // | 
| 9 | 
  | 
 //  Revision 1.5  2003/03/03 21:11:01  joko | 
| 10 | 
  | 
 //  mungled the namespaces | 
| 11 | 
  | 
 // | 
| 12 | 
  | 
 //  Revision 1.4  2003/03/01 04:58:02  joko | 
| 13 | 
  | 
 //  shifted four methods one more level to concreteness | 
| 14 | 
  | 
 // | 
| 15 | 
 //  Revision 1.3  2003/02/28 04:16:19  joko | 
 //  Revision 1.3  2003/02/28 04:16:19  joko | 
| 16 | 
 //  fix: getStatus now return status in bool | 
 //  fix: getStatus now return status in bool | 
| 17 | 
 // | 
 // | 
| 48 | 
     // --------------------   clone this & modify  ---------- | 
     // --------------------   clone this & modify  ---------- | 
| 49 | 
     $rpcinfo = $this->rpcinfo; | 
     $rpcinfo = $this->rpcinfo; | 
| 50 | 
     //$rpcinfo[to_latin] = 1;   // FIXME! implement this into Data::Driver::RPC::Remote! | 
     //$rpcinfo[to_latin] = 1;   // FIXME! implement this into Data::Driver::RPC::Remote! | 
| 51 | 
     $resultHandle = mkObject('Data::Driver::Proxy', $cache_key, array( key => 1, command => $command, query => $query, remote => 1, rpcinfo => $rpcinfo, cache => array( db => 0, session => 1 ) ) ); | 
     $resultHandle = mkObject('DesignPattern::RemoteProxy', $cache_key, array( key => 1, command => $command, query => $query, remote => 1, rpcinfo => $rpcinfo, cache => array( db => 0, session => 1 ) ) ); | 
| 52 | 
     $result = $resultHandle->getAttributes(); | 
     $result = $resultHandle->getResult(); | 
| 53 | 
  | 
     //print Dumper($result); exit; | 
| 54 | 
     return $result; | 
     return $result; | 
| 55 | 
     // --------------------   clone this & modify  ---------- | 
     // --------------------   clone this & modify  ---------- | 
| 56 | 
  | 
  | 
| 57 | 
   } | 
   } | 
| 58 | 
    | 
    | 
 | 
   function getObjectList() { | 
  | 
 | 
     return $this->_remote_method('getObjectList'); | 
  | 
 | 
   } | 
  | 
 | 
  | 
  | 
 | 
   function getObjects($obj_type) { | 
  | 
 | 
     return $this->_remote_method('getObjects', $obj_type); | 
  | 
 | 
   } | 
  | 
 | 
  | 
  | 
 | 
   function getObjectByGuid($obj_guid, $classname) { | 
  | 
 | 
     return $this->_remote_method('getObjectByGuid', array('guid' => $obj_guid, 'classname' => $classname)); | 
  | 
 | 
   } | 
  | 
 | 
  | 
  | 
 | 
   function saveObjectByGuid($obj, $classname) { | 
  | 
 | 
     return $this->_remote_method('saveObjectByGuid', array('data' => $obj, 'guid' => $obj['guid'], 'classname' => $classname)); | 
  | 
 | 
   } | 
  | 
 | 
  | 
  | 
| 59 | 
   function getStatus() { | 
   function getStatus() { | 
| 60 | 
     global $app; | 
     global $app; | 
| 61 | 
     $proxy = mkObject('Data::Driver::Proxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo") ) ); | 
     $proxy = mkObject('DesignPattern::RemoteProxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo") ) ); | 
| 62 | 
     return $proxy->backend->isConnected(); | 
     return $proxy->backend->isConnected(); | 
| 63 | 
   } | 
   } | 
| 64 | 
  | 
  | 
| 65 | 
   function forceConnect() { | 
   function forceConnect() { | 
| 66 | 
     global $app; | 
     global $app; | 
| 67 | 
     //print Dumper($app); | 
     //print Dumper($app); | 
| 68 | 
     $proxy = mkObject('Data::Driver::Proxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo"), connect => 1 ) ); | 
     $proxy = mkObject('DesignPattern::RemoteProxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo"), connect => 1 ) ); | 
| 69 | 
     //print Dumper($proxy); | 
     //print Dumper($proxy); | 
| 70 | 
     $proxy->backend->ping(); | 
     $proxy->backend->ping(); | 
| 71 | 
     $status_bool = $proxy->backend->isConnected(); | 
     $status_bool = $proxy->backend->isConnected(); |