PHP Class Prado\Data\SqlMap\TSqlMapConfig

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

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Private Methods

Méthode Description
getCacheKey ( ) : string

Method Details

cacheSqlMapManager() protected méthode

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

clearCache() public méthode

Deletes the configuration cache.
public clearCache ( )

createSqlMapGateway() protected méthode

protected createSqlMapGateway ( ) : TSqlMapGateway
Résultat TSqlMapGateway SqlMap gateway instance.

getClient() public méthode

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

getConfigFile() public méthode

public getConfigFile ( ) : string
Résultat string SqlMap configuration file.

getEnableCache() public méthode

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

getSqlMapManager() public méthode

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
Résultat TSqlMapManager SqlMap manager instance

loadCachedSqlMapManager() protected méthode

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

setConfigFile() public méthode

public setConfigFile ( $value )

setEnableCache() public méthode

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