public string | # getDatabaseFactory( ) defines the factory of this environment. It can be done by inheriting dataenv_xxx or putting a 'type' entry in config['db'] defines the factory of this environment. It can be done by inheriting dataenv_xxx or putting a 'type' entry in config['db'] Returns string databasefactory derived classname |
public array | # getQueryMap( ) gets the query definition map: name=>sqltext gets the query definition map: name=>sqltext Returns array key=>query string queries inventory |
public array | # getTables( ) associative array of envirnment direct tables key is the tablename, and value is an associative array of options (sort, filter, ...) associative array of envirnment direct tables key is the tablename, and value is an associative array of options (sort, filter, ...) Returns array |
public string | # getDatabaseName( ) retrieves the database value retrieves the database value default implementation takes value from config::val('db')['database'] Returns string |
public string | # getLogin( ) retrieves login name default implementation takes from config::val('db')['login'] Returns string |
public | # getPassword( ) retrieves password default implementation takes from config::val('db')['password'] |
public | # getPort( ) retrieves port number default implementation takes from config::val('db')['port'] |
public | # getServerName( ) retrieves server name default implementation takes from config::val('db')['server'] |
public | |
public cmc\db\database | # getConnectedDB( ) instantiates or retrieves a connected database according to current settings instantiates or retrieves a connected database according to current settings Returns |
public cmc\db\datasource | # getQueryDS( string $objectName ) instantiates or retrieves a datasource from its name in the inventory instantiates or retrieves a datasource from its name in the inventory Parameters - $objectName
string query name Returns |
public array | # getQueryFirst( string $qryName, array $params = false ) instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters, and finally fetches the first record instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters, and finally fetches the first record the result is an associative array of values Parameters - $qryName
string query name - $params
array parameter values Returns array |
public | |
public | |
public | # executionBegin( ) used for debugging information: called by objects just before executing SQL statement used for debugging information: called by objects just before executing SQL statement |
public | # executionLog( type $sql, type $rows ) used for debugging information: called by objects just after executing SQL statement used for debugging information: called by objects just after executing SQL statement Parameters - $sql
type $sql statement text - $rows
type $rows affected rows or null |
public | |
public cmc\db\datasource | # queryExecute( string $qryName, array $params = false ) instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters the result is the executed datasource Parameters - $qryName
string query name - $params
array parameter values Returns |
public | |