Class TSqlMapConfig

Description

TSqlMapConfig module configuration class.

Database connection and TSqlMapManager configuration.

  • author: Wei Zhuo <weizho[at]gmail[dot]com>
  • version: $Id: TSqlMapConfig.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • since: 3.1

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

TComponent
   |
   --TApplicationComponent
      |
      --TModule
         |
         --TDataSourceConfig
            |
            --TSqlMapConfig
Class Constant Summary
 CONFIG_FILE_EXT = '.xml'
Method Summary
Methods
cacheSqlMapManager (line 84)

Saves the current SqlMap manager to cache.

  • return: true if SqlMap manager was cached, false otherwise.
  • access: protected
boolean cacheSqlMapManager ( $manager)
  • $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
  • since: 3.1.7
  • access: public
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)
  • throws: TConfigurationException if the file is invalid.
  • access: public
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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()
Class Constants
CONFIG_FILE_EXT = '.xml' (line 34)

File extension of external configuration file

Documentation generated on Mon, 25 Jun 2012 14:39:15 +0200 by phpDocumentor 1.4.3