| 3 |
// $Id$ |
// $Id$ |
| 4 |
// --------------------------------------------------------------------------- |
// --------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.5 2003/03/03 21:11:01 joko |
| 7 |
|
// mungled the namespaces |
| 8 |
|
// |
| 9 |
// Revision 1.4 2003/03/01 04:58:02 joko |
// Revision 1.4 2003/03/01 04:58:02 joko |
| 10 |
// shifted four methods one more level to concreteness |
// shifted four methods one more level to concreteness |
| 11 |
// |
// |
| 45 |
// -------------------- clone this & modify ---------- |
// -------------------- clone this & modify ---------- |
| 46 |
$rpcinfo = $this->rpcinfo; |
$rpcinfo = $this->rpcinfo; |
| 47 |
//$rpcinfo[to_latin] = 1; // FIXME! implement this into Data::Driver::RPC::Remote! |
//$rpcinfo[to_latin] = 1; // FIXME! implement this into Data::Driver::RPC::Remote! |
| 48 |
$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 ) ) ); |
| 49 |
$result = $resultHandle->getAttributes(); |
$result = $resultHandle->getAttributes(); |
| 50 |
return $result; |
return $result; |
| 51 |
// -------------------- clone this & modify ---------- |
// -------------------- clone this & modify ---------- |
| 54 |
|
|
| 55 |
function getStatus() { |
function getStatus() { |
| 56 |
global $app; |
global $app; |
| 57 |
$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") ) ); |
| 58 |
return $proxy->backend->isConnected(); |
return $proxy->backend->isConnected(); |
| 59 |
} |
} |
| 60 |
|
|
| 61 |
function forceConnect() { |
function forceConnect() { |
| 62 |
global $app; |
global $app; |
| 63 |
//print Dumper($app); |
//print Dumper($app); |
| 64 |
$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 ) ); |
| 65 |
//print Dumper($proxy); |
//print Dumper($proxy); |
| 66 |
$proxy->backend->ping(); |
$proxy->backend->ping(); |
| 67 |
$status_bool = $proxy->backend->isConnected(); |
$status_bool = $proxy->backend->isConnected(); |