PHP Class Prado\Data\SqlMap\TSqlMapConfig

Database connection and TSqlMapManager configuration.
Since: 3.1
Inheritance: extends Prado\Data\TDataSourceConfig
Mostra file Open project: pradosoft/prado

Public Methods

Method Description
clearCache ( ) Deletes the configuration cache.
getClient ( ) : TSqlMapGateway Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
getConfigFile ( ) : string
getEnableCache ( ) : boolean
getSqlMapManager ( ) : TSqlMapManager Create and configure the data mapper using sqlmap configuration file.
setConfigFile ( $value )
setEnableCache ( $value ) Set true to cache sqlmap instances.

Protected Methods

Method Description
cacheSqlMapManager ( $manager ) : boolean Saves the current SqlMap manager to cache.
createSqlMapGateway ( ) : TSqlMapGateway
loadCachedSqlMapManager ( ) : TSqlMapManager Loads SqlMap manager from cache.

Private Methods

Method Description
getCacheKey ( ) : string

Method Details

cacheSqlMapManager() protected method

Saves the current SqlMap manager to cache.
protected cacheSqlMapManager ( $manager ) : boolean
return boolean true if SqlMap manager was cached, false otherwise.

clearCache() public method

Deletes the configuration cache.
public clearCache ( )

createSqlMapGateway() protected method

protected createSqlMapGateway ( ) : TSqlMapGateway
return TSqlMapGateway SqlMap gateway instance.

getClient() public method

Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
public getClient ( ) : TSqlMapGateway
return TSqlMapGateway SqlMap gateway instance.

getConfigFile() public method

public getConfigFile ( ) : string
return string SqlMap configuration file.

getEnableCache() public method

public getEnableCache ( ) : boolean
return boolean true if configuration should be cached, false otherwise.

getSqlMapManager() public method

Or if cache is enabled and manager already cached load from cache. If cache is enabled, the data mapper instance is cached.
Since: 3.1.7
public getSqlMapManager ( ) : TSqlMapManager
return TSqlMapManager SqlMap manager instance

loadCachedSqlMapManager() protected method

Loads SqlMap manager from cache.
protected loadCachedSqlMapManager ( ) : TSqlMapManager
return TSqlMapManager SqlMap manager intance if load was successful, null otherwise.

setConfigFile() public method

public setConfigFile ( $value )

setEnableCache() public method

Set true to cache sqlmap instances.
public setEnableCache ( $value )