Documentation

AbstractConsumerMiddleware extends AbstractMiddleware
in package

AbstractYes

Abstract implementation of a middleware for consumer life cycles.

Table of Contents

Properties

$consumer  : mixed
$suspended  : mixed

Methods

__construct()  : mixed
C'tor.
afterDownloadAndPersistFromDataSource()  : void
Teardown of `beforeDownloadAndPersistFromDataSource`. This is also invoked when the database throws the `AbortDataSourceDownloadException` exception.
afterUseTemplate()  : void
Teardown of `beforeDownloadAndPersistFromDataSource`.
beforeDownloadAndPersistFromDataSource()  : void
Before downloading from specified datasources. This allows you to e.g. change the language of the context to make translations work as expected.
beforeUseTemplate()  : void
Before using a template and running all the middlewares of `AbstractTemplateMiddleware`.
failedDownloadAndPersistFromDataSource()  : void
The download from a data source failed with an exception.
getConsumer()  : mixed
Getter.
getVariableResolver()  : mixed
Getter.
isSuspended()  : mixed
Check if the middleware is suspended.
suspend()  : mixed
Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.

Properties

Methods

afterDownloadAndPersistFromDataSource()

Teardown of `beforeDownloadAndPersistFromDataSource`. This is also invoked when the database throws the `AbortDataSourceDownloadException` exception.

public abstract afterDownloadAndPersistFromDataSource(Exception $exception) : void
Parameters
$exception : Exception

null when persist worked as expected, otherwise an Exception

beforeDownloadAndPersistFromDataSource()

Before downloading from specified datasources. This allows you to e.g. change the language of the context to make translations work as expected.

public abstract beforeDownloadAndPersistFromDataSource() : void

failedDownloadAndPersistFromDataSource()

The download from a data source failed with an exception.

public failedDownloadAndPersistFromDataSource(Exception $exception) : void
Parameters
$exception : Exception

getVariableResolver()

Getter.

public getVariableResolver() : mixed
Tags
codeCoverageIgnore

isSuspended()

Check if the middleware is suspended.

public isSuspended() : mixed

suspend()

Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.

public suspend(bool $state) : mixed
Parameters
$state : bool

        
On this page

Search results