--- nfo/php/libs/org.netfrag.glib/DataSource/Locator.php 2003/03/05 15:01:10 1.2 +++ nfo/php/libs/org.netfrag.glib/DataSource/Locator.php 2003/03/05 15:21:54 1.3 @@ -5,7 +5,7 @@ * It acts as a container for DataSource connection * metadata. Think of it as an enhanced dsn. * - * It gets used by DataSource::GenericDataSource + * It gets used by DataSource::Generic * to be informed about the most important stuff it * has to do. * @@ -16,9 +16,12 @@ */ /** - * $Id: Locator.php,v 1.2 2003/03/05 15:01:10 joko Exp $ + * $Id: Locator.php,v 1.3 2003/03/05 15:21:54 joko Exp $ * * $Log: Locator.php,v $ + * Revision 1.3 2003/03/05 15:21:54 joko + * updated docu (phpDocumentor testing....) + * * Revision 1.2 2003/03/05 15:01:10 joko * updated docu * @@ -29,17 +32,17 @@ */ /** - * It helps GenericDataSource working in different "operation modes". + * It helps DataSource::Generic working in different "operation modes". * - * o Pass-Through-Reference: php Object will get passed through all layers - * o Pass-Through-Memory: reference to a memory area will get used - * x Build-Locator: build locator from datasource-type and adapter-type - * o Use-Locator: directly use DataSource::Locator instance passed in - * o Merge-Locators: merge metadata of two or more DataSource::Locator instances - * o Build-AutoLocator: use global constants making up our metadata + * o Pass-Through-Reference: php Object will get passed through all layers + * o Pass-Through-Memory: reference to a memory area will get used + * + Build-Locator: build locator from datasource-type and adapter-type + * o Use-Locator: directly use DataSource::Locator instance passed in + * o Merge-Locators: merge metadata of two or more DataSource::Locator instances + * o Build-AutoLocator: use global constants making up our metadata * * - * It can/should contain (flexible, just some parameters are required for each operation mode) + * It can/should contain (flexible, just some parameters are required for each operation mode) * * o an oldschool "dsn"-string (e.g. for rdbms-connection via PEAR) * + name of a Proxy module to use to *wrap/hide* the connection/transport-layer @@ -49,18 +52,18 @@ * this will get propagated (pass-through-mode) * + a datasource-type (of 'rpc|mysql|csv-file|xml-file') * this will be mapped to a module name and used as a *Proxy* - * by the GenericDataSource at runtime + * by the DataSource::Generic at runtime * + an adapter-type (of 'phpHtmlLib|pear') * this will be mapped to a module name and used as an *Adapter* - * by the GenericDataSource at runtime + * by the DataSource::Generic at runtime * o names of global constants where to find these informations * o datasource-type ('rpc|csv-file|...') <-> datasource-family ('orm|rdbms|odbms') * * * --- It can do - * x builds a larger locator from a minimum of information passed in via constructor-arguments - * o direct fallback mode to some predefined constant names if locator is empty and above method fails - * o direct fallback mode to some predefined values if just *everything* fails + * + builds a larger locator from a minimum of information passed in via constructor-arguments + * o direct fallback mode to some predefined constant names if locator is empty and above method fails + * o direct fallback mode to some predefined values if just *everything* fails * * * --- How to use? @@ -76,14 +79,14 @@ * [adapter_type => 'phpHtmlLib',] * metadata => array( Host => 'localhost', Port => '8765' ), * ); - * $source = new GenericDataSource($locator); + * $source = new DataSource::Generic($locator); * $this->set_data_source( &$source ); * * 2. [proposal] for common/oldschool datahandles.... * $locator = array( * dsn => 'known dsn markup', * ); - * $source = new GenericDataSource($locator); + * $source = new DataSource::Generic($locator); * $this->set_data_source( &$source ); * * @@ -170,7 +173,7 @@ // name of an Adapter module var $_adapter_type; - // additional information required (passed on to the Proxy by GenericDataSource) + // additional information required (passed on to the Proxy by DataSource::Generic) var $_metadata = array(); //var $_dsn; @@ -284,7 +287,7 @@ $metadata = array( //package => 'Data::Driver::Proxy', //package => 'DataSource::Proxy::XMLRPC', - //package => 'DataSource::GenericDataSource', + //package => 'DataSource::Generic', //package => 'DesignPattern::RemoteProxy', Host => RPC_HOSTNAME, Port => RPC_PORT,