Skip to content

ReplayEloquentDatabase

EloquentDatabase, with EloquentQueryRecorder attached to the Illuminate connection it builds.

Registered under the eloquent driver alias by ReplayEloquentPlugin in place of the plain EloquentDatabase quioteframework/db-eloquent’s own EloquentPlugin registers.

Attaching after parent::connect() (rather than overriding the whole method) is safe here, unlike Doctrine’s DBAL middleware: attach() only calls Connection::listen(), which has nothing to do before the connection object already exists.

final class ReplayEloquentDatabase extends EloquentDatabase

ExtendsEloquentDatabase
SourceReplayEloquentDatabase.php

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
appendParameter()ParameterHolderAppend a parameter.
appendParameterByRef()ParameterHolderAppend a parameter by reference.
clearParameters()ParameterHolderClear all parameters associated with this request.
getCapsule()EloquentDatabaseReturns the Capsule manager, connecting on first use.
getConnection()DatabaseRetrieve the database connection associated with this Database implementation.
getDatabaseManager()DatabaseRetrieve the Database Manager instance for this implementation.
getEloquentConnection()EloquentDatabaseThe underlying Illuminate connection (query builder, PDO, transactions).
getFlatParameterNames()ParameterHolderRetrieve an array of flattened parameter names.
getName()DatabaseRetrieve the name of this database connection.
getParameter()ParameterHolderRetrieve a parameter.
getParameterNames()ParameterHolderRetrieve an array of parameter names.
getParameters()ParameterHolderRetrieve an array of parameters.
getPdo()EloquentDatabaseReturns the PDO handle Eloquent is using for the configured connection.
getResource()EloquentDatabaseReturns the Illuminate connection, routed through ReplayEloquentDatabase::getCapsule() so a layer-mode rebind happens before the caller sees it — the base class’s getResource() would otherwise hand back $this->resource directly and skip that check.
hasParameter()ParameterHolderIndicates whether or not a parameter exists.
initialize()DatabaseInitialize this Database.
ping()EloquentDatabaseProbes the connection with SELECT 1 on the raw PDO handle.
removeParameter()ParameterHolderRemove a parameter.
reset()DatabaseReturns this Database to its pre-initialize() state.
setParameter()ParameterHolderSet a parameter.
setParameterByRef()ParameterHolderSet a parameter by reference.
setParameters()ParameterHolderSet an array of parameters.
setParametersByRef()ParameterHolderSet an array of parameters by reference.
shutdown()EloquentDatabaseRolls back any open transaction, purges the connection from Eloquent’s database manager and drops the capsule.
startup()DatabaseDo any necessary startup work after initialization.