class PoweredByMiddleware implements MiddlewareInterface (View source)

Adds the "X-Flow-Powered" to the response.

Properties

protected ObjectManagerInterface $objectManager

Methods

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $next)

No description

static string
renderMajorVersion(string $version)

Renders a major version out of a full version string

static string
renderMinorVersion(string $version)

Renders a minor version out of a full version string

static string
prepareApplicationToken(ObjectManagerInterface $objectManager)

Generate an application information header for the response based on settings and package versions.

Details

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $next)

No description

Parameters

ServerRequestInterface $request
RequestHandlerInterface $next

Return Value

ResponseInterface

static protected string renderMajorVersion(string $version)

Renders a major version out of a full version string

Parameters

string $version

For example "2.3.7"

Return Value

string

For example "2"

static protected string renderMinorVersion(string $version)

Renders a minor version out of a full version string

Parameters

string $version

For example "2.3.7"

Return Value

string

For example "2.3"

static string prepareApplicationToken(ObjectManagerInterface $objectManager)

Generate an application information header for the response based on settings and package versions.

Will statically compile in production for performance benefits.

Parameters

ObjectManagerInterface $objectManager

Return Value

string

Exceptions

InvalidConfigurationTypeException