PHP Класс Prado\Data\ActiveRecord\TActiveRecordManager

The default connection can be set as follows: TActiveRecordManager::getInstance()->setDbConnection($conn); All new active record created after setting the {@link DbConnection setDbConnection()} will use that connection unless the custom ActiveRecord class overrides the ActiveRecord::getDbConnection(). Set the {@link setCache Cache} property to an ICache object to allow the active record gateway to cache the table meta data information.
С версии: 3.1
Наследование: extends Prado\TComponent
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getCache ( ) : ICache
getDbConnection ( ) : TDbConnection
getGatewayClass ( ) : string
getInstance ( $self = null ) : TActiveRecordManager
getInvalidFinderResult ( ) : TActiveRecordInvalidFinderResult
getRecordGateway ( ) : TActiveRecordGateway
setCache ( $value )
setDbConnection ( $conn )
setGatewayClass ( string $value ) Set implementation class of ActiveRecordGateway
setInvalidFinderResult ( $value ) Define the way an active record finder react if an invalid magic-finder invoked

Защищенные методы

Метод Описание
createRecordGateway ( ) : TActiveRecordGateway

Описание методов

createRecordGateway() защищенный метод

protected createRecordGateway ( ) : TActiveRecordGateway
Результат TActiveRecordGateway default record gateway.

getCache() публичный метод

public getCache ( ) : ICache
Результат ICache application cache.

getDbConnection() публичный метод

public getDbConnection ( ) : TDbConnection
Результат TDbConnection default database connection

getGatewayClass() публичный метод

public getGatewayClass ( ) : string
Результат string the implementation class of ActiveRecordGateway. Defaults to {@link TActiveRecordManager::DEFAULT_GATEWAY_CLASS DEFAULT_GATEWAY_CLASS}

getInstance() публичный статический метод

public static getInstance ( $self = null ) : TActiveRecordManager
Результат TActiveRecordManager static instance of record manager.

getInvalidFinderResult() публичный метод

См. также: setInvalidFinderResult
С версии: 3.1.5
public getInvalidFinderResult ( ) : TActiveRecordInvalidFinderResult
Результат TActiveRecordInvalidFinderResult Defaults to '{@link TActiveRecordInvalidFinderResult::Null Null}'.

getRecordGateway() публичный метод

public getRecordGateway ( ) : TActiveRecordGateway
Результат TActiveRecordGateway record gateway.

setCache() публичный метод

public setCache ( $value )

setDbConnection() публичный метод

public setDbConnection ( $conn )

setGatewayClass() публичный метод

Set implementation class of ActiveRecordGateway
public setGatewayClass ( string $value )
$value string

setInvalidFinderResult() публичный метод

Define the way an active record finder react if an invalid magic-finder invoked
См. также: getInvalidFinderResult
С версии: 3.1.5
public setInvalidFinderResult ( $value )