--- nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php 2003/03/03 22:06:46 1.1 +++ nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php 2003/03/05 12:14:02 1.2 @@ -2,9 +2,13 @@ /** * ------------------------------------------------------------------------- - * $Id: RemoteProxy.php,v 1.1 2003/03/03 22:06:46 joko Exp $ + * $Id: RemoteProxy.php,v 1.2 2003/03/05 12:14:02 joko Exp $ * ------------------------------------------------------------------------- * $Log: RemoteProxy.php,v $ + * Revision 1.2 2003/03/05 12:14:02 joko + * renamed method + * constructor argument expansion + * * Revision 1.1 2003/03/03 22:06:46 joko * refactored from Data::Driver::Proxy * @@ -185,6 +189,13 @@ logp(get_class($this) . "->new()", PEAR_LOG_INFO); global $proxy; + // 2003-03-05 - modified constructor + // expand objectId + if (is_array($objectId)) { + $options = $objectId[1]; + $objectId = $objectId[0]; + } + // trace //print Dumper($objectId, $options); @@ -193,6 +204,8 @@ $this->_init_caching(); $this->_init_load(); + //print Dumper($this); + } function _init_meta_options( $objectId="", $options = array() ) { @@ -217,7 +230,7 @@ if ($this->meta[remote]) { //$this->backend = mkObject('Data::Driver::RPC::Remote', $this->meta[rpcinfo]); - $this->backend = mkObject('DataSource::Proxy::XMLRPC', $this->meta[rpcinfo]); + $this->backend = php::mkComponent('DataSource::Proxy::XMLRPC', $this->meta[rpcinfo]); } } @@ -275,7 +288,7 @@ } */ - function getAttributes() { + function getResult() { if (!$this->meta[decoded]) { $this->_decode(); $this->_saveState();