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.
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Защищенные методы
Описание методов
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()
публичный метод
public getInvalidFinderResult ( ) : TActiveRecordInvalidFinderResult |
Результат |
TActiveRecordInvalidFinderResult |
Defaults to '{@link TActiveRecordInvalidFinderResult::Null Null}'. |
getRecordGateway()
публичный метод
public getRecordGateway ( ) : TActiveRecordGateway |
Результат |
TActiveRecordGateway |
record gateway. |
setCache()
публичный метод
setDbConnection()
публичный метод
setGatewayClass()
публичный метод
Set implementation class of ActiveRecordGateway
setInvalidFinderResult()
публичный метод
Define the way an active record finder react if an invalid magic-finder invoked