## Class TSqlMapConfig

Description

TSqlMapConfig module configuration class.

Database connection and TSqlMapManager configuration.

- since: 3.1
- version: $Id: TSqlMapConfig.php 1598 2007-01-06 00:00:57Z wei $
- 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 loadCachedSqlMapManager ()
void setConfigFile (string $value)
void setEnableCache (boolean $value)
Methods
cacheSqlMapManager (line 58)

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

Configure the data mapper using sqlmap configuration file.

If cache is enabled, the data mapper instance is cached.

- return: SqlMap gateway instance.
- access: protected

TSqlMapGateway createSqlMapGateway ()
getClient (line 155)

Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.

- return: SqlMap gateway instance.
- access: public

TSqlMapGateway getClient ()
getConfigFile (line 90)

- return: SqlMap configuration file.
- access: public

string getConfigFile ()
getEnableCache (line 126)

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

boolean getEnableCache ()
loadCachedSqlMapManager (line 73)

Loads SqlMap manager from cache.

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

TSqlMapManager loadCachedSqlMapManager ()
setConfigFile (line 100)

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

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 Sun, 14 Jan 2007 21:44:23 -0500 by phpDocumentor 1.3.0RC4