/[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.5 by joko, Tue Mar 11 00:12:49 2003 UTC revision 1.8 by jonen, Thu Mar 20 07:22:14 2003 UTC
# Line 9  Line 9 
9   */   */
10    
11  /**  /**
12     * <b>Cvs-Log:</b>
13     *
14     * <pre>
15   * $Id$   * $Id$
16   *   *
17   * $Log$   * $Log$
18     * Revision 1.8  2003/03/20 07:22:14  jonen
19     * + modified case 'object' to 'objects'
20     *   (cause its loads all *objects* of a given classname)
21     *
22     * Revision 1.7  2003/03/11 01:43:00  joko
23     * + fixed metadata for phpDocumentor
24     *
25     * Revision 1.6  2003/03/11 01:22:25  joko
26     * + fixed metadata for phpDocumentor
27     *
28   * Revision 1.5  2003/03/11 00:12:49  joko   * Revision 1.5  2003/03/11 00:12:49  joko
29   * + fixed metadata for phpDocumentor   * + fixed metadata for phpDocumentor
30   *   *
# Line 50  Line 63 
63   *   *
64   * Revision 1.1  2003/03/01 03:10:40  joko   * Revision 1.1  2003/03/01 03:10:40  joko
65   * + initial commit   * + initial commit
66   *   * </pre>
67   *   *
68   */   */
69    
# Line 129  loadModule('DesignPattern::AdapterProxy' Line 142  loadModule('DesignPattern::AdapterProxy'
142   * --- snipped into here from above ---   * --- snipped into here from above ---
143   * </pre>   * </pre>
144   *   *
145   *   * <p>
146   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------
147   *   *
148   * Data::Driver::Proxy instantiates "handlers" below itself   * Data::Driver::Proxy instantiates "handlers" below itself
# Line 150  loadModule('DesignPattern::AdapterProxy' Line 163  loadModule('DesignPattern::AdapterProxy'
163   * </pre>   * </pre>
164   *   *
165   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------   * !!!!!!  refactor this to Data::Driver::Proxy  !!!!!!     <-----------------
166     * </p>
167   *   *
168   *   *
169     * <p>
170   * <b>How to use?</b>   * <b>How to use?</b>
171   *   *
172   * Pass an array holding "locator metadata" to the constructor.   * Pass an array holding "locator metadata" to the constructor.
173   * GenericDataSource takes care of the rest.   * GenericDataSource takes care of the rest.
174   *   *
175     * <pre>
176   * Pass an array to the constructor: (e.g.)   * Pass an array to the constructor: (e.g.)
177   *   *
178   *  1. doing rpc-calls....   *  1. doing rpc-calls....
# Line 178  loadModule('DesignPattern::AdapterProxy' Line 194  loadModule('DesignPattern::AdapterProxy'
194   *    $source = ne w GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
195   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
196   *    </code>   *    </code>
197     * </pre>
198     * </p>
199     *
200   *   *
201   * @link http://www.netfrag.org/~joko/   * @link http://www.netfrag.org/~joko/
202   * @author Andreas Motl <andreas.motl@ilo.de>   * @author Andreas Motl <andreas.motl@ilo.de>
# Line 196  loadModule('DesignPattern::AdapterProxy' Line 215  loadModule('DesignPattern::AdapterProxy'
215   * @name DataSource::Generic   * @name DataSource::Generic
216   *   *
217   * @todo this:   * @todo this:
  *  
218   * o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles   * o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles
219   * o implement another Data::Driver::Proxy container   * o implement another Data::Driver::Proxy container
220   *   *
# Line 654  class DataSource_Generic extends DesignP Line 672  class DataSource_Generic extends DesignP
672              //$this->_locator->set_option('metadata.command', $command);              //$this->_locator->set_option('metadata.command', $command);
673              $args = array();              $args = array();
674              switch ($this->_query[vartype]) {              switch ($this->_query[vartype]) {
675                case 'object':                case 'objects':
676                  if (!$this->_query[classname]) {                  if (!$this->_query[classname]) {
677                    $msg = "_query[vartype] == 'object' requires _query[classname]";                    $msg = "_query[vartype] == 'objects' requires _query[classname]";
678                    user_error("GenericDataSource::query_data() - failed: " . $msg);                    user_error("GenericDataSource::query_data() - failed: " . $msg);
679                  }                  }
680                  array_push($args, $this->_query[classname]);                  array_push($args, $this->_query[classname]);

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

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