/[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.2 by joko, Wed Mar 5 17:28:43 2003 UTC revision 1.6 by joko, Tue Mar 11 01:22:25 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.6  2003/03/11 01:22:25  joko
19     * + fixed metadata for phpDocumentor
20     *
21     * Revision 1.5  2003/03/11 00:12:49  joko
22     * + fixed metadata for phpDocumentor
23     *
24     * Revision 1.4  2003/03/10 23:25:03  joko
25     * + fixed metadata for phpDocumentor
26     *
27     * Revision 1.3  2003/03/09 15:50:36  joko
28     * + additional metadata for Autodia
29     *
30   * Revision 1.2  2003/03/05 17:28:43  joko   * Revision 1.2  2003/03/05 17:28:43  joko
31   * updated docu (phpDocumentor testing....)   * updated docu (phpDocumentor testing....)
32   *   *
# Line 41  Line 56 
56   *   *
57   * Revision 1.1  2003/03/01 03:10:40  joko   * Revision 1.1  2003/03/01 03:10:40  joko
58   * + initial commit   * + initial commit
59   *   * </pre>
60   *   *
61   */   */
62    
# Line 156  loadModule('DesignPattern::AdapterProxy' Line 171  loadModule('DesignPattern::AdapterProxy'
171   *      type => 'rpc',   *      type => 'rpc',
172   *      metadata => array( Host => 'localhost', Port => '8765' ),   *      metadata => array( Host => 'localhost', Port => '8765' ),
173   *    );   *    );
174   *    $source = new GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
175   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
176   *    </code>   *    </code>
177   *   *
# Line 166  loadModule('DesignPattern::AdapterProxy' Line 181  loadModule('DesignPattern::AdapterProxy'
181   *      type => 'mysql',   *      type => 'mysql',
182   *      dsn => 'known dsn markup',   *      dsn => 'known dsn markup',
183   *    );   *    );
184   *    $source = new GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
185   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
186   *    </code>   *    </code>
187   *   *
# Line 186  loadModule('DesignPattern::AdapterProxy' Line 201  loadModule('DesignPattern::AdapterProxy'
201   * @subpackage DataSource   * @subpackage DataSource
202   * @name DataSource::Generic   * @name DataSource::Generic
203   *   *
204   * @todo   * @todo this:
  * <ul>  
  *  o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles  
  *  o implement another Data::Driver::Proxy container  
  * </ul>  
205   *   *
206     * o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles
207  //              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!   * o implement another Data::Driver::Proxy container
208  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!   *
209  //   * <pre>
210  //    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy   *              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!
211  //    inheritance trees at the same time, which is *not* possible at   *    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!
212  //    declare-time. We *do* need some runtime-infrastructure to solve this!   *
213  //   *    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy
214  //    TODO: move build- and check-locator stuff from ObjectList to this place!!!   *    inheritance trees at the same time, which is *not* possible at
215  //   *    declare-time. We *do* need some runtime-infrastructure to solve this!
216  //    ABOUT:   *
217  //      1. otherwhere: WebApp - scope:   *    TODO: move build- and check-locator stuff from ObjectList to this place!!!
218  //          x handles page vs. block vs. widget; dispatches MVC-View   *
219  //      2. here: DataSource - scope:   *    ABOUT:
220  //          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))   *      1. otherwhere: WebApp - scope:
221  //          o clean implementation using a DesignPattern::AdapterProxy   *          x handles page vs. block vs. widget; dispatches MVC-View
222  //   *      2. here: DataSource - scope:
223     *          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))
224  */   *          o clean implementation using a DesignPattern::AdapterProxy
225     * </pre>
226     *
227     *
228     */
229  class DataSource_Generic extends DesignPattern_AdapterProxy {  class DataSource_Generic extends DesignPattern_AdapterProxy {
230    
231  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!
# Line 326  class DataSource_Generic extends DesignP Line 341  class DataSource_Generic extends DesignP
341                  //$this->_locator->_datasource_type = $query[datasource];                  //$this->_locator->_datasource_type = $query[datasource];
342                  //$locator[_datasource_type] = $query[datasource];                  //$locator[_datasource_type] = $query[datasource];
343                                    
344          /**
345           * <!-- Autodia -->
346           * can do: (this is metadata supplied for Autodia, don't delete!)
347           *  $this->_locator = new DataSource_Locator()
348           *
349           */
350    
351                  // build master locator                  // build master locator
352                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[datasource] ) );                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[datasource] ) );
353                  //exit;                  //exit;
# Line 372  class DataSource_Generic extends DesignP Line 394  class DataSource_Generic extends DesignP
394  //exit;  //exit;
395    
396    
397        /**
398         * <!-- Autodia -->
399         * can do: (this is metadata supplied for Autodia, don't delete!)
400         *  $proxy = new DesignPattern_RemoteProxy()
401         *
402         */
403    
404    
405      // --- Proxy selector/dispatcher ...      // --- Proxy selector/dispatcher ...
406            
407      switch ($this->_locator->_datasource_type) {      switch ($this->_locator->_datasource_type) {
# Line 467  class DataSource_Generic extends DesignP Line 497  class DataSource_Generic extends DesignP
497        // $this->create_handler();        // $this->create_handler();
498    
499    
500          /**
501           * <!-- Autodia -->
502           * can do: (this is metadata supplied for Autodia, don't delete!)
503           *  $adapter = new DataSource_Adapter_phpHtmlLib_DataListSource()
504           *
505           */
506    
507        // V1:        // V1:
508        //$this->create_adapter($adapter_module, $this->function, $this->arguments);        //$this->create_adapter($adapter_module, $this->function, $this->arguments);
509    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

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