Skip to content

EloquentEffectSource

The EffectSource implementation Quiote\Replay\Recording\RecorderMiddleware activates/deactivates around one request.

EloquentQueryRecorder is attached once, to a specific connection, so this source only has to point ActiveEffectLedger at the current request’s ledger — every ReplayEloquentDatabase connection reads it from there.

final class EloquentEffectSource implements EffectSource

ImplementsEffectSource
SourceEloquentEffectSource.php
MethodDescription
activate(string $correlationId, EffectLedger $ledger): voidCalled once, before $handler->handle(), for every request RecorderMiddleware buffers.
deactivate(string $correlationId): voidCalled once, as soon as $handler->handle() returns or throws.

public function activate(string $correlationId, EffectLedger $ledger): void

Called once, before $handler->handle(), for every request RecorderMiddleware buffers.

ParameterTypeDescription
$correlationIdstring
$ledgerEffectLedger

public function deactivate(string $correlationId): void

Called once, as soon as $handler->handle() returns or throws.

ParameterTypeDescription
$correlationIdstring