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.
Since: 3.1
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

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

Méthodes protégées

Méthode Description
createRecordGateway ( ) : TActiveRecordGateway

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

See also: setInvalidFinderResult
Since: 3.1.5
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

public setCache ( $value )

setDbConnection() public méthode

public setDbConnection ( $conn )

setGatewayClass() public méthode

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

setInvalidFinderResult() public méthode

Define the way an active record finder react if an invalid magic-finder invoked
See also: getInvalidFinderResult
Since: 3.1.5
public setInvalidFinderResult ( $value )