/[cvs]/nfo/php/libs/org.netfrag.glib/DataSource/Generic.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DataSource/Generic.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jonen, Thu Mar 20 07:22:14 2003 UTC revision 1.10 by joko, Fri Mar 28 03:01:02 2003 UTC
# Line 15  Line 15 
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   * Revision 1.8  2003/03/20 07:22:14  jonen
26   * + modified case 'object' to 'objects'   * + modified case 'object' to 'objects'
27   *   (cause its loads all *objects* of a given classname)   *   (cause its loads all *objects* of a given classname)
# Line 462  class DataSource_Generic extends DesignP Line 469  class DataSource_Generic extends DesignP
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
# Line 667  class DataSource_Generic extends DesignP Line 674  class DataSource_Generic extends DesignP
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 'objects':                case 'objects':
# Line 680  class DataSource_Generic extends DesignP Line 688  class DataSource_Generic extends DesignP
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          }          }
# Line 749  class DataSource_Generic extends DesignP Line 784  class DataSource_Generic extends DesignP
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;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed