/[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.5 by joko, Tue Mar 11 00:12:49 2003 UTC
# Line 12  Line 12 
12   * $Id$   * $Id$
13   *   *
14   * $Log$   * $Log$
15     * Revision 1.5  2003/03/11 00:12:49  joko
16     * + fixed metadata for phpDocumentor
17     *
18     * Revision 1.4  2003/03/10 23:25:03  joko
19     * + fixed metadata for phpDocumentor
20     *
21     * Revision 1.3  2003/03/09 15:50:36  joko
22     * + additional metadata for Autodia
23     *
24   * Revision 1.2  2003/03/05 17:28:43  joko   * Revision 1.2  2003/03/05 17:28:43  joko
25   * updated docu (phpDocumentor testing....)   * updated docu (phpDocumentor testing....)
26   *   *
# Line 156  loadModule('DesignPattern::AdapterProxy' Line 165  loadModule('DesignPattern::AdapterProxy'
165   *      type => 'rpc',   *      type => 'rpc',
166   *      metadata => array( Host => 'localhost', Port => '8765' ),   *      metadata => array( Host => 'localhost', Port => '8765' ),
167   *    );   *    );
168   *    $source = new GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
169   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
170   *    </code>   *    </code>
171   *   *
# Line 166  loadModule('DesignPattern::AdapterProxy' Line 175  loadModule('DesignPattern::AdapterProxy'
175   *      type => 'mysql',   *      type => 'mysql',
176   *      dsn => 'known dsn markup',   *      dsn => 'known dsn markup',
177   *    );   *    );
178   *    $source = new GenericDataSource($locator);   *    $source = ne w GenericDataSource($locator);
179   *    $this->set_data_source( &$source );   *    $this->set_data_source( &$source );
180   *    </code>   *    </code>
181   *   *
# Line 186  loadModule('DesignPattern::AdapterProxy' Line 195  loadModule('DesignPattern::AdapterProxy'
195   * @subpackage DataSource   * @subpackage DataSource
196   * @name DataSource::Generic   * @name DataSource::Generic
197   *   *
198   * @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>  
199   *   *
200     * o mungle this to be able to be wrapped around phpHtmlLib's own storage-handles
201  //              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!   * o implement another Data::Driver::Proxy container
202  //    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!   *
203  //   * <pre>
204  //    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy   *              !!!!!!!!          THIS IS THE PROBLEM          !!!!!!!!
205  //    inheritance trees at the same time, which is *not* possible at   *    !!!!!!!!   here is it where we have to break inheritance again   !!!!!!!!
206  //    declare-time. We *do* need some runtime-infrastructure to solve this!   *
207  //   *    THE CONFLICT: Beeing in phpHtmlLib *and* DesignPattern::TransparentProxy
208  //    TODO: move build- and check-locator stuff from ObjectList to this place!!!   *    inheritance trees at the same time, which is *not* possible at
209  //   *    declare-time. We *do* need some runtime-infrastructure to solve this!
210  //    ABOUT:   *
211  //      1. otherwhere: WebApp - scope:   *    TODO: move build- and check-locator stuff from ObjectList to this place!!!
212  //          x handles page vs. block vs. widget; dispatches MVC-View   *
213  //      2. here: DataSource - scope:   *    ABOUT:
214  //          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))   *      1. otherwhere: WebApp - scope:
215  //          o clean implementation using a DesignPattern::AdapterProxy   *          x handles page vs. block vs. widget; dispatches MVC-View
216  //   *      2. here: DataSource - scope:
217     *          x handles bridge to frameworks (e.g. phpHtmlLib) vs. actual data driver libs (PEAR, etc.))
218  */   *          o clean implementation using a DesignPattern::AdapterProxy
219     * </pre>
220     *
221     *
222     */
223  class DataSource_Generic extends DesignPattern_AdapterProxy {  class DataSource_Generic extends DesignPattern_AdapterProxy {
224    
225  //    !!!!!!!!   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 335  class DataSource_Generic extends DesignP
335                  //$this->_locator->_datasource_type = $query[datasource];                  //$this->_locator->_datasource_type = $query[datasource];
336                  //$locator[_datasource_type] = $query[datasource];                  //$locator[_datasource_type] = $query[datasource];
337                                    
338          /**
339           * <!-- Autodia -->
340           * can do: (this is metadata supplied for Autodia, don't delete!)
341           *  $this->_locator = new DataSource_Locator()
342           *
343           */
344    
345                  // build master locator                  // build master locator
346                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[datasource] ) );                  $this->_locator = php::mkComponent('DataSource::Locator', $locator, array( datasource_type => $query[datasource] ) );
347                  //exit;                  //exit;
# Line 372  class DataSource_Generic extends DesignP Line 388  class DataSource_Generic extends DesignP
388  //exit;  //exit;
389    
390    
391        /**
392         * <!-- Autodia -->
393         * can do: (this is metadata supplied for Autodia, don't delete!)
394         *  $proxy = new DesignPattern_RemoteProxy()
395         *
396         */
397    
398    
399      // --- Proxy selector/dispatcher ...      // --- Proxy selector/dispatcher ...
400            
401      switch ($this->_locator->_datasource_type) {      switch ($this->_locator->_datasource_type) {
# Line 467  class DataSource_Generic extends DesignP Line 491  class DataSource_Generic extends DesignP
491        // $this->create_handler();        // $this->create_handler();
492    
493    
494          /**
495           * <!-- Autodia -->
496           * can do: (this is metadata supplied for Autodia, don't delete!)
497           *  $adapter = new DataSource_Adapter_phpHtmlLib_DataListSource()
498           *
499           */
500    
501        // V1:        // V1:
502        //$this->create_adapter($adapter_module, $this->function, $this->arguments);        //$this->create_adapter($adapter_module, $this->function, $this->arguments);
503    

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

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