Copied!

EngineFailureEvent

EngineFailureEvent.php : 22
Final
Extends Event

Dispatched when the back office cannot get data from the product catalog engine, e.g. a PIM which cannot be reached, so that the engine can recognize the failure.

An engine which recognizes it gives the reason, as shown to the back-office user: the back office then tells it instead of failing. The reason is only translated when it is shown, so recognizing a failure costs nothing where it is not. A failure nobody recognizes is left to fail as before.

Methods

public__construct()

EngineFailureEvent.php : 26
public __construct(Throwable $throwable)

Parameters

Name Type Default value Description
$throwable Throwable - -

publicgetReason()

EngineFailureEvent.php : 47
public getReason() : EngineFailureReasonInterface|null

Return values

EngineFailureReasonInterface|null

publicgetThrowable()

EngineFailureEvent.php : 33

The failure as thrown, which may wrap the engine's own one.

public getThrowable() : Throwable

Return values

Throwable

publicisPropagationStopped()

Event.php : 35
public isPropagationStopped() : bool

Return values

bool

publicisRecognized()

EngineFailureEvent.php : 52
public isRecognized() : bool

Return values

bool

publicsetReason()

EngineFailureEvent.php : 41

Marks the failure as recognized, and stops the propagation of the event.

public setReason(EngineFailureReasonInterface $reason) : void

Parameters

Name Type Default value Description
$reason EngineFailureReasonInterface - -

publicstopPropagation()

Event.php : 47

Stops the propagation of the event to further event listeners.

public stopPropagation() : void

If multiple event listeners are connected to the same event, no further event listener will be triggered once any trigger calls stopPropagation().