PHP 클래스 Prado\Data\SqlMap\TSqlMapManager

Use {@link SqlMapGateway getSqlMapGateway()} property to obtain the gateway instance used for querying statements defined in the SqlMap configuration files. $conn = new TDbConnection($dsn,$dbuser,$dbpass); $manager = new TSqlMapManager($conn); $manager->configureXml('mydb-sqlmap.xml'); $sqlmap = $manager->getSqlMapGateway(); $result = $sqlmap->queryForObject('Products');
부터: 3.1
상속: extends Prado\TComponent
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $connection = null ) Constructor, create a new SqlMap manager.
addCacheModel ( TSqlMapCacheModel $cacheModel ) Adds a named cache.
addMappedStatement ( Prado\Data\SqlMap\Statements\IMappedStatement $statement ) Adds a (named) MappedStatement.
addParameterMap ( TParameterMap $parameter )
addResultMap ( TResultMap $result )
configureXml ( $file ) Loads and parses the SqlMap configuration file.
flushCacheModels ( ) Flushes all cached objects that belong to this SqlMap
getCacheDependencies ( ) : TChainedCacheDependency
getCacheModel ( $name ) : TSqlMapCacheModel Gets a cache by name
getDbConnection ( ) : TDbConnection
getMappedStatement ( $name ) : Prado\Data\SqlMap\Statements\IMappedStatement Gets a MappedStatement by name.
getMappedStatements ( ) : TMap
getParameterMap ( $name ) : TParameterMap
getParameterMaps ( ) : TMap
getResultMap ( $name ) : TResultMap Gets a named result map
getResultMaps ( ) : TMap
getSqlmapGateway ( ) : TSqlMapGateway
getTypeHandlers ( ) : TTypeHandlerFactory
setDbConnection ( $conn )

보호된 메소드들

메소드 설명
createSqlMapGateway ( ) : TSqlMapGateway Configures the current TSqlMapManager using the given xml configuration file defined in {@link ConfigFile setConfigFile()}.

메소드 상세

__construct() 공개 메소드

Constructor, create a new SqlMap manager.
public __construct ( $connection = null )

addCacheModel() 공개 메소드

Adds a named cache.
public addCacheModel ( TSqlMapCacheModel $cacheModel )
$cacheModel Prado\Data\SqlMap\Configuration\TSqlMapCacheModel

addMappedStatement() 공개 메소드

Adds a (named) MappedStatement.
public addMappedStatement ( Prado\Data\SqlMap\Statements\IMappedStatement $statement )
$statement Prado\Data\SqlMap\Statements\IMappedStatement

addParameterMap() 공개 메소드

public addParameterMap ( TParameterMap $parameter )
$parameter Prado\Data\SqlMap\Configuration\TParameterMap

addResultMap() 공개 메소드

public addResultMap ( TResultMap $result )
$result Prado\Data\SqlMap\Configuration\TResultMap

configureXml() 공개 메소드

Loads and parses the SqlMap configuration file.
public configureXml ( $file )

createSqlMapGateway() 보호된 메소드

Configures the current TSqlMapManager using the given xml configuration file defined in {@link ConfigFile setConfigFile()}.
protected createSqlMapGateway ( ) : TSqlMapGateway
리턴 TSqlMapGateway create and configure a new TSqlMapGateway.

flushCacheModels() 공개 메소드

Flushes all cached objects that belong to this SqlMap
public flushCacheModels ( )

getCacheDependencies() 공개 메소드

부터: 3.1.5
public getCacheDependencies ( ) : TChainedCacheDependency
리턴 Prado\Caching\TChainedCacheDependency

getCacheModel() 공개 메소드

Gets a cache by name
public getCacheModel ( $name ) : TSqlMapCacheModel
리턴 Prado\Data\SqlMap\Configuration\TSqlMapCacheModel the cache object.

getDbConnection() 공개 메소드

public getDbConnection ( ) : TDbConnection
리턴 TDbConnection default database connection

getMappedStatement() 공개 메소드

Gets a MappedStatement by name.
public getMappedStatement ( $name ) : Prado\Data\SqlMap\Statements\IMappedStatement
리턴 Prado\Data\SqlMap\Statements\IMappedStatement The MappedStatement

getMappedStatements() 공개 메소드

public getMappedStatements ( ) : TMap
리턴 Prado\Collections\TMap mapped statements collection.

getParameterMap() 공개 메소드

public getParameterMap ( $name ) : TParameterMap
리턴 Prado\Data\SqlMap\Configuration\TParameterMap the parameter with given ID.

getParameterMaps() 공개 메소드

public getParameterMaps ( ) : TMap
리턴 Prado\Collections\TMap parameter maps collection.

getResultMap() 공개 메소드

Gets a named result map
public getResultMap ( $name ) : TResultMap
리턴 Prado\Data\SqlMap\Configuration\TResultMap the result map.

getResultMaps() 공개 메소드

public getResultMaps ( ) : TMap
리턴 Prado\Collections\TMap result maps collection.

getSqlmapGateway() 공개 메소드

public getSqlmapGateway ( ) : TSqlMapGateway
리턴 TSqlMapGateway SqlMap gateway.

getTypeHandlers() 공개 메소드

public getTypeHandlers ( ) : TTypeHandlerFactory
리턴 TTypeHandlerFactory The TypeHandlerFactory

setDbConnection() 공개 메소드

public setDbConnection ( $conn )