15 |
* $Id$ |
* $Id$ |
16 |
* |
* |
17 |
* $Log$ |
* $Log$ |
18 |
|
* Revision 1.10 2003/03/28 03:01:02 joko |
19 |
|
* more fancy debugging-output |
20 |
|
* |
21 |
|
* Revision 1.9 2003/03/27 16:24:26 jonen |
22 |
|
* + mugled namespace |
23 |
|
* + added enhanced 'queryData' |
24 |
|
* |
25 |
|
* Revision 1.8 2003/03/20 07:22:14 jonen |
26 |
|
* + modified case 'object' to 'objects' |
27 |
|
* (cause its loads all *objects* of a given classname) |
28 |
|
* |
29 |
* Revision 1.7 2003/03/11 01:43:00 joko |
* Revision 1.7 2003/03/11 01:43:00 joko |
30 |
* + fixed metadata for phpDocumentor |
* + fixed metadata for phpDocumentor |
31 |
* |
* |
469 |
case 'phpHtmlLib': |
case 'phpHtmlLib': |
470 |
//$adapter_arguments = $args[title]; |
//$adapter_arguments = $args[title]; |
471 |
|
|
472 |
$this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataListSource'); |
$this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataSource'); |
473 |
|
|
474 |
// in order to let the Adapter communicate with the Proxy, |
// in order to let the Adapter communicate with the Proxy, |
475 |
// instantiate a wrapper method in a third namespace via |
// instantiate a wrapper method in a third namespace via |
674 |
// FIXME: abstract this some more (e.g. via a CommandMapper|Registry) |
// FIXME: abstract this some more (e.g. via a CommandMapper|Registry) |
675 |
switch ($this->_query[metatype]) { |
switch ($this->_query[metatype]) { |
676 |
case 'data': |
case 'data': |
677 |
//$command = 'queryData'; |
$command = 'queryData'; |
678 |
$command = 'getObjects'; // FIXME!!! |
//$command = 'getObjects'; // FIXME!!! |
679 |
//$this->_locator->set_option('metadata.command', $command); |
//$this->_locator->set_option('metadata.command', $command); |
680 |
|
/* |
681 |
$args = array(); |
$args = array(); |
682 |
switch ($this->_query[vartype]) { |
switch ($this->_query[vartype]) { |
683 |
case 'object': |
case 'objects': |
684 |
if (!$this->_query[classname]) { |
if (!$this->_query[classname]) { |
685 |
$msg = "_query[vartype] == 'object' requires _query[classname]"; |
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
686 |
user_error("GenericDataSource::query_data() - failed: " . $msg); |
user_error("GenericDataSource::query_data() - failed: " . $msg); |
687 |
} |
} |
688 |
array_push($args, $this->_query[classname]); |
array_push($args, $this->_query[classname]); |
689 |
break; |
break; |
690 |
} |
} |
691 |
break; |
*/ |
692 |
|
$query_args = array(); |
693 |
|
switch ($this->_query[abstract_type]) { |
694 |
|
case 'list': |
695 |
|
if (!$this->_query[classname]) { |
696 |
|
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
697 |
|
user_error("GenericDataSource::query_data() - failed: " . $msg); |
698 |
|
} |
699 |
|
//array_push($query_args, $this->_query[classname]); |
700 |
|
$query_args[classname] = $this->_query[classname]; |
701 |
|
break; |
702 |
|
case 'item': |
703 |
|
if (!$this->_query[classname]) { |
704 |
|
$msg = "_query[vartype] == 'objects' requires _query[classname]"; |
705 |
|
user_error("GenericDataSource::query_data() - failed: " . $msg); |
706 |
|
} |
707 |
|
$query_args[guid] = $this->_query[ident]; |
708 |
|
$query_args[classname] = $this->_query[classname]; |
709 |
|
break; |
710 |
|
} |
711 |
|
$args = array( |
712 |
|
'data_type' => $this->_query[abstract_type], |
713 |
|
'query_args' => $query_args |
714 |
|
); |
715 |
|
break; |
716 |
|
|
717 |
|
// querySchema |
718 |
case 'schema': |
case 'schema': |
719 |
|
//print "Testing schema:" . "<br>"; |
720 |
$command = 'querySchema'; |
$command = 'querySchema'; |
721 |
break; |
break; |
722 |
} |
} |
784 |
// trace |
// trace |
785 |
if ($this->_debug[notice]) { |
if ($this->_debug[notice]) { |
786 |
//print "_result = " . Dumper($this->_result); |
//print "_result = " . Dumper($this->_result); |
787 |
print "DataSource::Generic->_result_count = " . $this->_result_count . "<br/>"; |
print "<div><b><font color=\"darkgreen\">Debug:</font></b> DataSource::Generic->_result_count = <b>" . $this->_result_count . "</b></div>"; |
788 |
} |
} |
789 |
|
|
790 |
return $this->_result; |
return $this->_result; |