Class TSqlMapConfig

Description

TSqlMapConfig module configuration class.

Database connection and TSqlMapManager configuration.

  • since: 3.1
  • version: $Id: TSqlMapConfig.php 2541 2008-10-21 15:05:13Z qiang.xue $
  • 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 ()
string getConfigFile ()
boolean getEnableCache ()
void setConfigFile (string $value)
void setEnableCache (boolean $value)
Methods
cacheSqlMapManager (line 59)

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

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

Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.

  • return: SqlMap gateway instance.
  • access: public
TSqlMapGateway getClient ()
getConfigFile (line 92)
  • return: SqlMap configuration file.
  • access: public
string getConfigFile ()
getEnableCache (line 128)
  • return: true if configuration should be cached, false otherwise.
  • access: public
boolean getEnableCache ()
loadCachedSqlMapManager (line 75)

Loads SqlMap manager from cache.

  • return: SqlMap manager intance if load was successful, null otherwise.
  • access: protected
TSqlMapManager loadCachedSqlMapManager ()
setConfigFile (line 102)
  • 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 120)

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, 11 Jan 2009 20:23:53 -0500 by phpDocumentor 1.3.0RC4