class ReplicaKillSwitch implements EventSubscriberInterface (View source)

Provides replica server kill switch to ignore it.

Properties

protected Settings $settings

The settings object.

protected TimeInterface $time

The time service.

protected SessionInterface $session

The session.

Methods

__construct(Settings $settings, TimeInterface $time, SessionInterface $session)

Constructs a ReplicaKillSwitch object.

trigger()

Denies access to replica database on the current request.

checkReplicaServer(RequestEvent $event)

Checks and disables the replica database server if appropriate.

static 
getSubscribedEvents()

{@inheritdoc}

Details

__construct(Settings $settings, TimeInterface $time, SessionInterface $session)

Constructs a ReplicaKillSwitch object.

Parameters

Settings $settings

The settings object.

TimeInterface $time

The time service.

SessionInterface $session

The session.

trigger()

Denies access to replica database on the current request.

checkReplicaServer(RequestEvent $event)

Checks and disables the replica database server if appropriate.

Parameters

RequestEvent $event

The Event to process.

static getSubscribedEvents()

{@inheritdoc}