## Class TSqlMapConfig

Description

TSqlMapConfig module configuration class.

Database connection and TSqlMapManager configuration.

- since: 3.1
- version: $Id: TSqlMapConfig.php 2745 2009-11-08 15:11:14Z godzilla80@gmx.net $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/SqlMap/TSqlMapConfig.php (line 25)

    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TDataSourceConfig
                |
                --TSqlMapConfig

Class Constant Summary
CONFIG_FILE_EXT = '.xml'
Method Summary
boolean cacheSqlMapManager (mixed $manager)
void clearCache ()
TSqlMapGateway createSqlMapGateway ()
TSqlMapGateway getClient ()
string getConfigFile ()
boolean getEnableCache ()
TSqlMapManager getSqlMapManager ()
TSqlMapManager loadCachedSqlMapManager ()
void setConfigFile (string $value)
void setEnableCache (boolean $value)
Methods
cacheSqlMapManager (line 84)

Saves the current SqlMap manager to cache.

- return: true if SqlMap manager was cached, false otherwise.
- access: protected

boolean cacheSqlMapManager (mixed $manager)
clearCache (line 47)

Deletes the configuration cache.

- access: public

void clearCache ()
createSqlMapGateway (line 165)

- return: SqlMap gateway instance.
- access: protected

TSqlMapGateway createSqlMapGateway ()
getClient (line 174)

Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.

- return: SqlMap gateway instance.
- access: public

TSqlMapGateway getClient ()
getConfigFile (line 121)

- return: SqlMap configuration file.
- access: public

string getConfigFile ()
getEnableCache (line 157)

- return: true if configuration should be cached, false otherwise.
- access: public

boolean getEnableCache ()
getSqlMapManager (line 63)

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.

- return: SqlMap manager instance
- access: public
- since: 3.1.7

TSqlMapManager getSqlMapManager ()
loadCachedSqlMapManager (line 103)

Loads SqlMap manager from cache.

- return: SqlMap manager intance if load was successful, null otherwise.
- access: protected

TSqlMapManager loadCachedSqlMapManager ()
setConfigFile (line 131)

- access: public
- throws: TConfigurationException if the file is invalid.

void setConfigFile (string $value)

- string $value: external configuration file in namespace format. The file extension must be '.xml'.

setEnableCache (line 149)

Set true to cache sqlmap instances.

- access: public

void setEnableCache (boolean $value)

- boolean $value: true to cache sqlmap instance.

#### Inherited Methods

Inherited From TDataSourceConfig

> TDataSourceConfig::findConnectionByID()
> TDataSourceConfig::getConnectionClass()
> TDataSourceConfig::getConnectionID()
> TDataSourceConfig::getDatabase()
> TDataSourceConfig::getDbConnection()
> TDataSourceConfig::init()
> TDataSourceConfig::setConnectionClass()
> TDataSourceConfig::setConnectionID()

Inherited From TModule

> TModule::getID()
> TModule::init()
> TModule::setID()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

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()

Class Constants
CONFIG_FILE_EXT = '.xml' (line 34)

File extension of external configuration file

Documentation generated on Mon, 22 Feb 2010 12:18:41 +0000 by phpDocumentor 1.3.0RC4