| 15 |
* $Id$ |
* $Id$ |
| 16 |
* |
* |
| 17 |
* $Log$ |
* $Log$ |
| 18 |
|
* Revision 1.9 2003/03/27 16:24:26 jonen |
| 19 |
|
* + mugled namespace |
| 20 |
|
* + added enhanced 'queryData' |
| 21 |
|
* |
| 22 |
* Revision 1.8 2003/03/20 07:22:14 jonen |
* Revision 1.8 2003/03/20 07:22:14 jonen |
| 23 |
* + modified case 'object' to 'objects' |
* + modified case 'object' to 'objects' |
| 24 |
* (cause its loads all *objects* of a given classname) |
* (cause its loads all *objects* of a given classname) |
| 466 |
case 'phpHtmlLib': |
case 'phpHtmlLib': |
| 467 |
//$adapter_arguments = $args[title]; |
//$adapter_arguments = $args[title]; |
| 468 |
|
|
| 469 |
$this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataListSource'); |
$this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataSource'); |
| 470 |
|
|
| 471 |
// in order to let the Adapter communicate with the Proxy, |
// in order to let the Adapter communicate with the Proxy, |
| 472 |
// instantiate a wrapper method in a third namespace via |
// instantiate a wrapper method in a third namespace via |
| 671 |
// FIXME: abstract this some more (e.g. via a CommandMapper|Registry) |
// FIXME: abstract this some more (e.g. via a CommandMapper|Registry) |
| 672 |
switch ($this->_query[metatype]) { |
switch ($this->_query[metatype]) { |
| 673 |
case 'data': |
case 'data': |
| 674 |
//$command = 'queryData'; |
$command = 'queryData'; |
| 675 |
$command = 'getObjects'; // FIXME!!! |
//$command = 'getObjects'; // FIXME!!! |
| 676 |
//$this->_locator->set_option('metadata.command', $command); |
//$this->_locator->set_option('metadata.command', $command); |
| 677 |
|
/* |
| 678 |
$args = array(); |
$args = array(); |
| 679 |
switch ($this->_query[vartype]) { |
switch ($this->_query[vartype]) { |
| 680 |
case 'objects': |
case 'objects': |
| 685 |
array_push($args, $this->_query[classname]); |
array_push($args, $this->_query[classname]); |
| 686 |
break; |
break; |
| 687 |
} |
} |
| 688 |
break; |
*/ |
| 689 |
|
$query_args = array(); |
| 690 |
|
switch ($this->_query[abstract_type]) { |
| 691 |
|
case 'list': |
| 692 |
|
if (!$this->_query[classname]) { |
| 693 |
|
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
| 694 |
|
user_error("GenericDataSource::query_data() - failed: " . $msg); |
| 695 |
|
} |
| 696 |
|
//array_push($query_args, $this->_query[classname]); |
| 697 |
|
$query_args[classname] = $this->_query[classname]; |
| 698 |
|
break; |
| 699 |
|
case 'item': |
| 700 |
|
if (!$this->_query[classname]) { |
| 701 |
|
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
| 702 |
|
user_error("GenericDataSource::query_data() - failed: " . $msg); |
| 703 |
|
} |
| 704 |
|
$query_args[guid] = $this->_query[ident]; |
| 705 |
|
$query_args[classname] = $this->_query[classname]; |
| 706 |
|
break; |
| 707 |
|
} |
| 708 |
|
$args = array( |
| 709 |
|
'data_type' => $this->_query[abstract_type], |
| 710 |
|
'query_args' => $query_args |
| 711 |
|
); |
| 712 |
|
break; |
| 713 |
|
|
| 714 |
|
// querySchema |
| 715 |
case 'schema': |
case 'schema': |
| 716 |
|
//print "Testing schema:" . "<br>"; |
| 717 |
$command = 'querySchema'; |
$command = 'querySchema'; |
| 718 |
break; |
break; |
| 719 |
} |
} |