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

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

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