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 |
10 |
|
// shifted four methods one more level to concreteness |
11 |
|
// |
12 |
|
// Revision 1.3 2003/02/28 04:16:19 joko |
13 |
|
// fix: getStatus now return status in bool |
14 |
|
// |
15 |
|
// Revision 1.2 2003/02/27 14:37:56 jonen |
16 |
|
// + added function 'saveObjectByGuid()' |
17 |
|
// |
18 |
// Revision 1.1 2003/02/22 16:19:38 joko |
// Revision 1.1 2003/02/22 16:19:38 joko |
19 |
// + initial commit |
// + initial commit |
20 |
// |
// |
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 ---------- |
52 |
|
|
53 |
} |
} |
54 |
|
|
|
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)); |
|
|
} |
|
|
|
|
55 |
function getStatus() { |
function getStatus() { |
56 |
global $app; |
global $app; |
57 |
//print Dumper($app); |
$proxy = mkObject('DesignPattern::RemoteProxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo") ) ); |
58 |
$proxy = mkObject('Data::Driver::Proxy', null, array( remote => 1, rpcinfo => $app->getConfig("rpcinfo") ) ); |
return $proxy->backend->isConnected(); |
|
//print Dumper($proxy); |
|
|
$status_bool = $proxy->backend->isConnected(); |
|
|
$status_yesno = $status_bool ? 'yes' : 'no'; |
|
|
return $status_yesno; |
|
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(); |