/[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.3 by joko, Sun Mar 9 15:50:36 2003 UTC revision 1.28 by jonen, Thu Oct 7 14:11:28 2004 UTC
# Line 9  Line 9 
9   */   */
10    
11  /**  /**
12     * Cvs-Log:
13     *
14   * $Id$   * $Id$
15   *   *
16   * $Log$   * $Log$
17     * Revision 1.28  2004/10/07 14:11:28  jonen
18     * + added HACK related to DataList-filters which are mapped to backend now (page-control!)
19     *
20     * Revision 1.27  2004/06/15 12:50:48  joko
21     * disabled caching in "datasource_handler_call"
22     *
23     * Revision 1.26  2003/12/14 01:53:42  jonen
24     * implemented 'SELECT' mode for selecting existing object-refereneces as child-nodes
25     *
26     * Revision 1.25  2003/11/17 18:01:03  jonen
27     * bugfix: php cannot use perl-syntax!! ;-)
28     *
29     * Revision 1.23  2003/07/14 10:02:32  jonen
30     * removed debug dumper
31     *
32     * Revision 1.22  2003/06/06 04:25:45  joko
33     * fix: query args get encapsulated once more
34     *
35     * Revision 1.21  2003/05/10 18:14:50  jonen
36     * + implements 'create' of item (query mapping part)
37     *
38     * Revision 1.20  2003/04/19 16:07:15  jonen
39     * + added '_query[list_meta]' at 'queryData' needed for meta query args
40     *    (e.g. at UserManagment)
41     *
42     * Revision 1.19  2003/04/18 15:40:51  joko
43     * NEW: tree data handling
44     *   introduced new adapter: DataSource::Adapter::Free
45     *   enhanced datasource_handler_buildoptions: now handles a) case 'tree'  b) _query[filter]
46     *
47     * Revision 1.18  2003/04/11 00:55:49  joko
48     * updated 'datasource_handler_buildoptions': action dispatcher now aware of 'delete'
49     *
50     * Revision 1.17  2003/04/09 02:07:33  joko
51     * CHANGE: renamed key 'classname' through 'nodename'
52     *
53     * Revision 1.16  2003/04/08 17:55:20  joko
54     * CHANGE: renamed property 'datasource' to 'transport'
55     * NEW: new case 'method' in 'function datasource_handler_buildoptions'
56     * minor fixes: updated logging/debugging messages
57     *
58     * Revision 1.15  2003/04/06 04:46:33  joko
59     * renamed linking function
60     * mozilla fixes
61     *
62     * Revision 1.14  2003/04/04 21:19:21  joko
63     * modified exception handling (enhanced, purged redundant code)
64     *
65     * Revision 1.13  2003/04/04 02:37:14  jonen
66     * _query[action] == write
67     *
68     * Revision 1.12  2003/03/29 08:00:48  joko
69     * modified ErrorBoxing
70     *
71     * Revision 1.11  2003/03/28 06:45:26  joko
72     * VERBOSE mode
73     *
74     * Revision 1.10  2003/03/28 03:01:02  joko
75     * more fancy debugging-output
76     *
77     * Revision 1.9  2003/03/27 16:24:26  jonen
78     * + mugled namespace
79     * + added enhanced 'queryData'
80     *
81     * Revision 1.8  2003/03/20 07:22:14  jonen
82     * + modified case 'object' to 'objects'
83     *   (cause its loads all *objects* of a given classname)
84     *
85     * Revision 1.7  2003/03/11 01:43:00  joko
86     * + fixed metadata for phpDocumentor
87     *
88     * Revision 1.6  2003/03/11 01:22:25  joko
89     * + fixed metadata for phpDocumentor
90     *
91     * Revision 1.5  2003/03/11 00:12:49  joko
92     * + fixed metadata for phpDocumentor
93     *
94     * Revision 1.4  2003/03/10 23:25:03  joko
95     * + fixed metadata for phpDocumentor
96     *
97   * Revision 1.3  2003/03/09 15:50:36  joko   * Revision 1.3  2003/03/09 15:50:36  joko
98   * + additional metadata for Autodia   * + additional metadata for Autodia
99   *   *
# Line 45  Line 127 
127   * Revision 1.1  2003/03/01 03:10:40  joko   * Revision 1.1  2003/03/01 03:10:40  joko
128   * + initial commit   * + initial commit
129   *   *
  *  
130   */   */
131    
132  /**  /**
# Line 123  loadModule('DesignPattern::AdapterProxy' Line 204  loadModule('DesignPattern::AdapterProxy'
204   * --- snipped into here from above ---   * --- snipped into here from above ---
205   * </pre>   * </pre>
206   *   *
207   *   * <p>
208   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------
209   *   *
210   * Data::Driver::Proxy instantiates "handlers" below itself   * Data::Driver::Proxy instantiates "handlers" below itself
# Line 144  loadModule('DesignPattern::AdapterProxy' Line 225  loadModule('DesignPattern::AdapterProxy'
225   * </pre>   * </pre>
226   *   *
227   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------
228     * </p>
229   *   *
230   *   *
231     * <p>
232   * <b>How to use?</b>   * <b>How to use?</b>
233   *   *
234   * Pass an array holding "locator metadata" to the constructor.   * Pass an array holding "locator metadata" to the constructor.
235   * GenericDataSource takes care of the rest.   * GenericDataSource takes care of the rest.
236   *   *
237     * <pre>
238   * Pass an array to the constructor: (e.g.)   * Pass an array to the constructor: (e.g.)
239   *   *
240   *  1. doing rpc-calls....   *  1. doing rpc-calls....
# Line 172  loadModule('DesignPattern::AdapterProxy' Line 256  loadModule('DesignPattern::AdapterProxy'
256   *    $source = ne w GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
257   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
258   *    </code>   *    </code>
259     * </pre>
260     * </p>
261     *
262   *   *
263   * @link http://www.netfrag.org/~joko/   * @link http://www.netfrag.org/~joko/
264   * @author Andreas Motl <andreas.motl@ilo.de>   * @author Andreas Motl <andreas.motl@ilo.de>
# Line 189  loadModule('DesignPattern::AdapterProxy' Line 276  loadModule('DesignPattern::AdapterProxy'
276   * @subpackage DataSource   * @subpackage DataSource
277   * @name DataSource::Generic   * @name DataSource::Generic
278   *   *
279   * @todo   * @todo this:
280   * <ul>   * o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles
281   *  o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles   * o implement another Data::Driver::Proxy container
  *  o implement another Data::Driver::Proxy container  
  * </ul>  
282   *   *
283     * <pre>
284  //              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!   *              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!
285  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!   *    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!
286  //   *
287  //    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy   *    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy
288  //    inheritance trees at the same time, which is *not* possible at   *    inheritance trees at the same time, which is *not* possible at
289  //    declare-time. We *do* need some runtime-infrastructure to solve this!   *    declare-time. We *do* need some runtime-infrastructure to solve this!
290  //   *
291  //    TODO: move build- and check-locator stuff from ObjectList to this place!!!   *    TODO: move build- and check-locator stuff from ObjectList to this place!!!
292  //   *
293  //    ABOUT:   *    ABOUT:
294  //      1. otherwhere: WebApp - scope:   *      1. otherwhere: WebApp - scope:
295  //          x handles page vs. block vs. widget; dispatches MVC-View   *          x handles page vs. block vs. widget; dispatches MVC-View
296  //      2. here: DataSource - scope:   *      2. here: DataSource - scope:
297  //          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))   *          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))
298  //          o clean implementation using a DesignPattern::AdapterProxy   *          o clean implementation using a DesignPattern::AdapterProxy
299  //   * </pre>
300     *
301  */   *
302     */
303  class DataSource_Generic extends DesignPattern_AdapterProxy {  class DataSource_Generic extends DesignPattern_AdapterProxy {
304    
305  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!
# Line 236  class DataSource_Generic extends DesignP Line 322  class DataSource_Generic extends DesignP
322      * other presets.      * other presets.
323      *      *
324      * See '_buildLocator' which acts as a dispatcher      * See '_buildLocator' which acts as a dispatcher
325      * depending on $_options[datasource].      * depending on $_options[transport].
326      * (main dispatching level)      * (main dispatching level)
327      *      *
328      * The structure of a full blown locator looks like this:      * The structure of a full blown locator looks like this:
# Line 325  class DataSource_Generic extends DesignP Line 411  class DataSource_Generic extends DesignP
411          function DataSource_Generic( &$locator, $query ) {          function DataSource_Generic( &$locator, $query ) {
412    
413                  // copy parameter from query to locator                  // copy parameter from query to locator
414                  //$this->_locator->merge_to($this->_locator, array( datasource_type => $query[datasource] ), '_');                  //$this->_locator->merge_to($this->_locator, array( datasource_type => $query[transport] ), '_');
415                  //$this->_locator->_datasource_type = $query[datasource];                  //$this->_locator->_datasource_type = $query[transport];
416                  //$locator[_datasource_type] = $query[datasource];                  //$locator[_datasource_type] = $query[transport];
417                                    
418        /**        /**
419         * <!-- Autodia -->         * <!-- Autodia -->
# Line 337  class DataSource_Generic extends DesignP Line 423  class DataSource_Generic extends DesignP
423         */         */
424    
425                  // build master locator                  // build master locator
426                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[datasource] ) );                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[transport] ) );
427                  //exit;                  //exit;
428                  //$this->_locator = php::mkComponent('DataSource::Locator');                  //$this->_locator = php::mkComponent('DataSource::Locator');
429                                    
# Line 358  class DataSource_Generic extends DesignP Line 444  class DataSource_Generic extends DesignP
444                  */                  */
445                                    
446        //$this->set_locator( $locator );        //$this->set_locator( $locator );
447          //print "query: " . Dumper($query) . "<br>";
448        $this->set_query( $query );        $this->set_query( $query );
449    
450    
# Line 374  class DataSource_Generic extends DesignP Line 461  class DataSource_Generic extends DesignP
461      // pre-flight: check locator metadata      // pre-flight: check locator metadata
462        //$locator->build();        //$locator->build();
463        if (!$this->_locator->check()) {        if (!$this->_locator->check()) {
464          user_error("locator-check failed.");          user_error("DataSource::Generic: locator-check failed." . "<br/>" . "Locator was: " . Dumper($this->_locator) );
465          exit;          //exit;
466           //return;           return;
467        }        }
468    
469  //exit;  //exit;
# Line 435  class DataSource_Generic extends DesignP Line 522  class DataSource_Generic extends DesignP
522          // ... resolves this._modules.adapter._id to this._modules.adapter._module          // ... resolves this._modules.adapter._id to this._modules.adapter._module
523                    
524          switch ($locator->_adapter_type) {          switch ($locator->_adapter_type) {
525    
526            case 'phpHtmlLib':            case 'phpHtmlLib':
527              //$adapter_arguments = $args[title];              //$adapter_arguments = $args[title];
528                $this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataSource');
             $this->set_adapter_module('DataSource::Adapter::phpHtmlLib::DataListSource');  
529                            
530              // in order to let the Adapter communicate with the Proxy,              // in order to let the Adapter communicate with the Proxy,
531              // instantiate a wrapper method in a third namespace via              // instantiate a wrapper method in a third namespace via
532              // Exporter::export_symbol(from, to)              // Exporter::export_symbol(from, to)
533              $this->set_adapter_options($this);              $this->set_adapter_options($this);
534                break;
535    
536              // NEW [2003-04-17]: Freedom for the adapter!
537              // phpHtmlLib didn't have a tree widget, but PEAR does.
538              // So: Free us from the phpHtmlLib-adapter in this case.
539              case 'free':
540                $this->set_adapter_module('DataSource::Adapter::Free');
541                $this->set_adapter_options($this);
542              break;              break;
543    
544            default:            default:
545              user_error("DataSource::GenericDataSource: no Adapter could be selected!");              user_error("DataSource::Generic: no Adapter could be selected: \$locator->_adapter_type='$locator->_adapter_type'");
546              break;              break;
547          }          }
548    
# Line 611  class DataSource_Generic extends DesignP Line 705  class DataSource_Generic extends DesignP
705                
706                
707        //$this->set_component_name( $proxy_name );        //$this->set_component_name( $proxy_name );
708        $this->set_component_options( $cache_key, array( key => 1, command => $command, query => $query, remote => 1, rpcinfo => $rpcinfo, cache => array( db => 0, session => 1 ) ) );        $this->set_component_options( $cache_key, array( key => 1, command => $command, query => $query, remote => 1, rpcinfo => $rpcinfo, cache => array( db => 0, session => 0 ) ) );
709        //print Dumper($this);        //print Dumper($this);
710        //exit;        //exit;
711                
# Line 643  class DataSource_Generic extends DesignP Line 737  class DataSource_Generic extends DesignP
737        // FIXME: abstract this some more (e.g. via a CommandMapper|Registry)        // FIXME: abstract this some more (e.g. via a CommandMapper|Registry)
738          switch ($this->_query[metatype]) {          switch ($this->_query[metatype]) {
739            case 'data':            case 'data':
740              //$command = 'queryData';              $command = 'queryData';
741              $command = 'getObjects';   // FIXME!!!              
742                //$command = 'getObjects';   // FIXME!!!
743              //$this->_locator->set_option('metadata.command', $command);              //$this->_locator->set_option('metadata.command', $command);
744    /*
745              $args = array();              $args = array();
746              switch ($this->_query[vartype]) {              switch ($this->_query[vartype]) {
747                case 'object':                case 'objects':
748                  if (!$this->_query[classname]) {                  if (!$this->_query[classname]) {
749                    $msg = "_query[vartype] == 'object' requires _query[classname]";                    $msg = "_query[vartype] == 'objects' requires _query[classname]";
750                    user_error("GenericDataSource::query_data() - failed: " . $msg);                    user_error("DataSource::Generic: query_data() - failed: " . $msg);
751                  }                  }
752                  array_push($args, $this->_query[classname]);                  array_push($args, $this->_query[classname]);
753                  break;                  break;
754              }              }
755              break;   */
756                $query_args = array();
757                
758                 $msg_prefix = "DataSource::Generic::datasource_handler_buildoptions failed: ";
759                 switch ($this->_query[abstract_type]) {
760                  case 'item':
761                    if (!$this->_query[nodename] && $this->_query[action] != 'create') {
762                      $msg = "_query[vartype] == 'objects' requires _query[nodename]";
763                      user_error($msg_prefix . $msg);
764                    } elseif($this->_query[action] == 'create' && $this->_query[parent]) {
765                      if($this->_query[nodename]) { $query_args[node_class] = $this->_query[nodename]; }
766                      if($this->_query['hash_key']) { $query_args['hash_key'] = $this->_query['hash_key']; }
767                      $query_args[nodename] = $this->_query[ident];
768                      $query_args[parent][guid] = $this->_query[parent][guid];
769                      $query_args[parent][nodename] = $this->_query[parent][nodename];
770                    } elseif($this->_query[parent]) {
771                      $query_args[guid] = $this->_query[ident];
772                      $query_args[nodename] = $this->_query[nodename];
773                      $query_args[parent][guid] = $this->_query[parent][guid];
774                      $query_args[parent][nodename] = $this->_query[parent][nodename];
775                    } else {
776                      $query_args[guid] = $this->_query[ident];
777                      $query_args[nodename] = $this->_query[nodename];
778                      // 2003-11-17 NEW: use expand flag for real obj expand at backend
779                      if ($this->_query[expand]) {$query_args[expand] = 1; }
780                    }
781                    //print "generic_source->debug: args " . Dumper($query_args) . "<br>";
782                    break;
783                  case 'list':
784                    if (!$this->_query[nodename]) {
785                      $msg = "_query[vartype] == 'objects' requires _query[nodename]";
786                      user_error($msg_prefix . $msg);
787                    } elseif($this->_query[parent]) {
788                      //if($this->_query[nodename]) { $query_args[node_class] = $this->_query[nodename]; }
789                      //if($this->_query['hash_key']) { $query_args['hash_key'] = $this->_query['hash_key']; }
790                      //$query_args[nodename] = $this->_query[ident];
791                      $query_args[parent][guid] = $this->_query[parent][guid];
792                      $query_args[parent][nodename] = $this->_query[parent][nodename];
793                    }
794                    //array_push($query_args, $this->_query[nodename]);
795                    $query_args[nodename] = $this->_query[nodename];
796                    if($this->_query[list_meta]) { $query_args[list_meta] = $this->_query[list_meta]; }
797                    break;
798                  case 'tree':
799                    /*
800                    if (!$this->_query[nodename]) {
801                      $msg = "_query[vartype] == 'objects' requires _query[nodename]";
802                      user_error($msg_prefix . $msg);
803                    }
804                    */
805                    $query_args[guid] = $this->_query[ident];
806                    //$query_args[nodename] = $this->_query[nodename];
807                    break;
808                  default:
809                    $msg = "\$this->_query[abstract_type] could not be dispatched as 'item', 'list' or 'tree'.";
810                    user_error($msg_prefix . $msg);
811                    break;
812                }
813                
814                // filter???
815                //print "Filter: " . Dumper($this->_query[filter]) . "<br>";
816                if ($this->_query[filter]) {
817                  $query_args[filter] = $this->_query[filter];
818                }
819                
820                // dispatch action
821                //print "Action: " . $this->_query[action] . "<br>";
822                if ($this->_query[action] == 'write') {
823                 $query_args[action] = $this->_query[action];
824                 $query_args[data] = $this->_query[data];
825                } elseif ($this->_query[action] == 'delete') {
826                 $query_args[action] = $this->_query[action];
827                } elseif ($this->_query[action] == 'create') {
828                   $query_args[action] = $this->_query[action];
829                } elseif ($this->_query[action] == 'select') {
830                   $query_args[action] = $this->_query[action];
831                }
832                
833                $args = array(
834                              'data_type' => $this->_query[abstract_type],
835                              'query_args' => $query_args
836                              );
837               break;
838    
839              // querySchema
840            case 'schema':            case 'schema':
841                //print "Testing schema:" . "<br>";
842              $command = 'querySchema';              $command = 'querySchema';
843                $args = array( $this->_query[filter] );
844                break;
845                
846              // remoteMethod
847              case 'method':
848                $command = $this->_query[method];
849                //$args = $this->_query[args];
850                // FIX
851                $args = array( $this->_query[args] );
852              break;              break;
853    
854          }          }
855                
856          
857            // FIXME: bad behaviour?
858            if (!is_array($args)) { $args = array( $args ); }
859            
860            //print Dumper($args);
861                    
862          /*          /*
863          $this->_query[rpc_command] = $command;          $this->_query[rpc_command] = $command;
# Line 694  class DataSource_Generic extends DesignP Line 890  class DataSource_Generic extends DesignP
890                
891    }    }
892    
893    
894    
895          function &fetch_result() {          function &fetch_result() {
896    
897          //print Dumper($this);
898                
899        $this->datasource_handler_buildoptions();        $this->datasource_handler_buildoptions();
900    
901        $method = $this->_locator->_call[_method];        $call = $this->_locator->get_call();
902        $args = $this->_locator->_call[_arguments];  
903                //print Dumper($call);
904          //return;
905    
906        // pre-flight checks        // pre-flight checks
907          if (!$method) {          if (!$call[method]) {
908            $msg = "Remote command could not be resolved, please pass in or check configuration.";            $msg = "Remote method is empty, please pass in proper metadata or check configuration.";
909                          user_error("GenericDataSource::query_data() - failed: " . $msg);                          user_error("DataSource::Generic: query_data() - failed: " . $msg);
910            return;            return;
911          }          }
912    
# Line 712  class DataSource_Generic extends DesignP Line 914  class DataSource_Generic extends DesignP
914    
915        // do remote call here and get result        // do remote call here and get result
916        // FIXME: handle synchronous/asynchronous mode here!!!        // FIXME: handle synchronous/asynchronous mode here!!!
917          $this->datasource_handler_call($method, $args);          $this->datasource_handler_call($call[method], $call[args]);
918                    
919                    
920          // TODO: ... = $this->poll_handler_result  and  $this->get_handler_result          // TODO: ... = $this->poll_handler_result  and  $this->get_handler_result
921          $proxy = $this->get_proxy();          $proxy = $this->get_proxy();
922          $this->_result = $proxy->getResult();            //HACK 2004-10-07: page-filter done by backend now,
923              //                 before offset values filled with empty arrays
924            //$this->_result = $proxy->getResult();
925            $result = $proxy->getResult();
926            if($result['total_rows']) {
927              // debug
928              //print "result: " . Dumper($result);
929              $this->_result_count = $result['total_rows'];
930              if($result[offset]) {
931                $result_new = array();
932                for($i=0;$i<$result[offset];$i++) {
933                  array_push($result_new, array());
934                }
935                foreach($result['payload'] as $key => $value) {
936                  array_push($result_new, $value);
937                }
938                $this->_result = $result_new;
939              } else {
940                $this->_result = $result['payload'];
941              }
942            } else {
943              $this->_result = $result;
944              $this->_result_count = sizeof($this->_result);
945            }
946            //print "result: " . Dumper($this->_result);
947          //print "result: " . Dumper($this->_result); exit;          //print "result: " . Dumper($this->_result); exit;
948    
         $this->_result_count = sizeof($this->_result);  
949    
950        // trace        // trace
951          if ($this->_debug[notice]) {          //if (constants::get('VERBOSE') && $this->_debug[notice]) {
952            if (constants::get('VERBOSE') or constants::get('ERRORS_ONLY')) {
953            //print "_result = " . Dumper($this->_result);            //print "_result = " . Dumper($this->_result);
954            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>";
955              $this->draw_status_box();
956          }          }
957            
958          return $this->_result;          return $this->_result;
959    
960          }          }
961    
962      function draw_status_box() {
963    
964        static $boxcount;
965        
966        $boxcount++;
967    
968        $box = container();
969    
970        // box style
971        $style = container(
972          html_style("text/css", '.boxlabel_darkgreen { color: darkgreen; font-weight:bold; }'),
973          html_style("text/css", '.box_dsg { background: #20ab39; color: white; border: 2px black groove; width:640px; padding:10px; margin:40px; }')
974        );
975        $box->add( $style );
976        
977        // box content
978        $statusbox = html_div('box_dsg');
979        $statusbox->add( html_b("DataSource::Generic"), html_br() );
980        $locatorbox = html_div('box_dsg');
981        $locatorbox->set_id("locatorbox_$boxcount");
982        $locatorbox->add( Dumper($this->_locator) );
983        
984        // FIXME: ie/mozilla?
985        //$locatorbox->set_style('display:none;');
986        //$locatorbox->set_style('visibility:hidden;');
987        // already duplicate inside Tracer!!!
988        $locatorbox->set_style('visibility:hidden; position:absolute; z-index:1; margin-top:30px; padding:5px;');
989        
990        $statusbox->add( html_span('boxlabel_darkgreen', "Locator:"), link::js_function( 'toggleVisibility', array("locatorbox_$boxcount"), '[show]'), $locatorbox, html_br() );
991        $call = $this->_locator->get_call();
992        $statusbox->add( html_span('boxlabel_darkgreen', "Method:"), $call[method], html_br() );
993        if (sizeof($call[args])) {
994          $statusbox->add( html_span('boxlabel_darkgreen', "Arguments:"), Dumper($call[args]), html_br() );
995        }
996        $statusbox->add( html_span('boxlabel_darkgreen', "Count:"), $this->get_result_count(), html_br() );
997        $box->add( $statusbox );
998    
999        //print $box->render();
1000        trace( $box );
1001    
1002      }
1003    
1004    
1005    function &query_data() {    function &query_data() {
1006      //print "query!<br/>";      //print "query!<br/>";
# Line 747  class DataSource_Generic extends DesignP Line 1016  class DataSource_Generic extends DesignP
1016    function &get_result() {    function &get_result() {
1017      return $this->_result;      return $this->_result;
1018    }    }
1019      
1020      function get_result_count() {
1021        return $this->_result_count;
1022      }
1023                    
1024  }  }
1025    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.28

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