Class TSqlMapConfig
TSqlMapConfig module configuration class.
Database connection and TSqlMapManager configuration.
| Method Summary |
|
protected
boolean
|
Saves the current SqlMap manager to cache.
|
|
void
|
Deletes the configuration cache.
|
|
protected
TSqlMapGateway
|
|
|
TSqlMapGateway
|
Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
|
|
string
|
|
|
boolean
|
|
|
TSqlMapManager
|
Create and configure the data mapper using sqlmap configuration file.
|
|
protected
TSqlMapManager
|
Loads SqlMap manager from cache.
|
|
void
|
|
|
void
|
Set true to cache sqlmap instances.
|
| Methods Inherited From TComponent |
|
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
| Constant Summary |
| string
|
CONFIG_FILE_EXT |
File extension of external configuration file
|
| Method Details |
cacheSqlMapManager
| protected boolean cacheSqlMapManager |
(mixed $manager ) |
Saves the current SqlMap manager to cache.
| Input |
| mixed | $manager | |
| Output |
|
boolean
| true if SqlMap manager was cached, false otherwise. |
| Exception |
|
clearCache
| public void clearCache |
() |
Deletes the configuration cache.
|
createSqlMapGateway
|
getClient
Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
|
getConfigFile
| public string getConfigFile |
() |
| Output |
|
string
| SqlMap configuration file. |
| Exception |
|
getEnableCache
| public boolean getEnableCache |
() |
| Output |
|
boolean
| true if configuration should be cached, false otherwise. |
| Exception |
|
getSqlMapManager
Create and configure the data mapper using sqlmap configuration file.
Or if cache is enabled and manager already cached load from cache. If cache is enabled, the data mapper instance is cached.
|
loadCachedSqlMapManager
Loads SqlMap manager from cache.
| Output |
|
TSqlMapManager
| SqlMap manager intance if load was successful, null otherwise. |
| Exception |
|
setConfigFile
| public void setConfigFile |
(string $value ) |
| Input |
| string | $value | external configuration file in namespace format. The file extension must be '.xml'. |
| Output |
| Exception |
| throws | TConfigurationException if the file is invalid. |
|
setEnableCache
| public void setEnableCache |
(boolean $value ) |
Set true to cache sqlmap instances.
| Input |
| boolean | $value | true to cache sqlmap instance. |
| Output |
| Exception |
|
| Constant Details |
CONFIG_FILE_EXT
File extension of external configuration file
Type:
string
Value:
'.xml'
|
|