PHP Class 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.
Afficher le fichier
Open project: pradosoft/prado
Class Usage Examples
Méthodes publiques
Méthodes protégées
Method Details
createRecordGateway()
protected méthode
protected createRecordGateway ( ) : TActiveRecordGateway |
Résultat |
TActiveRecordGateway |
default record gateway. |
getCache()
public méthode
public getCache ( ) : ICache |
Résultat |
ICache |
application cache. |
getDbConnection()
public méthode
public getDbConnection ( ) : TDbConnection |
Résultat |
TDbConnection |
default database connection |
getGatewayClass()
public méthode
public getGatewayClass ( ) : string |
Résultat |
string |
the implementation class of ActiveRecordGateway. Defaults to {@link TActiveRecordManager::DEFAULT_GATEWAY_CLASS DEFAULT_GATEWAY_CLASS} |
getInstance()
public static méthode
public static getInstance ( $self = null ) : TActiveRecordManager |
Résultat |
TActiveRecordManager |
static instance of record manager. |
getInvalidFinderResult()
public méthode
public getInvalidFinderResult ( ) : TActiveRecordInvalidFinderResult |
Résultat |
TActiveRecordInvalidFinderResult |
Defaults to '{@link TActiveRecordInvalidFinderResult::Null Null}'. |
getRecordGateway()
public méthode
public getRecordGateway ( ) : TActiveRecordGateway |
Résultat |
TActiveRecordGateway |
record gateway. |
setCache()
public méthode
setDbConnection()
public méthode
setGatewayClass()
public méthode
Set implementation class of ActiveRecordGateway
setInvalidFinderResult()
public méthode
Define the way an active record finder react if an invalid magic-finder invoked