phpDocumentor

StopwatchMiddleware
in package
implements Middleware

Interfaces, Classes, Traits and Enums

Middleware

Table of Contents

$logger  : LoggerInterface
$memory  : int
$stopwatch  : Stopwatch
__construct()  : mixed
execute()  : object
Executes this middleware class.
formatMemoryInKilobytes()  : string
formatMemoryInMegabytes()  : string
log()  : void
Dispatches a logging request.

Properties

Methods

__construct()

public __construct(Stopwatch $stopwatch, LoggerInterface $logger) : mixed
Parameters
$stopwatch : Stopwatch
$logger : LoggerInterface
Return values
mixed

execute()

Executes this middleware class.

public execute(Command $command, callable $next) : object
Parameters
$command : Command
$next : callable
Return values
object

formatMemoryInKilobytes()

private formatMemoryInKilobytes(int $memory) : string
Parameters
$memory : int
Return values
string

formatMemoryInMegabytes()

private formatMemoryInMegabytes(int $memory) : string
Parameters
$memory : int
Return values
string

log()

Dispatches a logging request.

private log(string $message[, string $priority = LogLevel::INFO ][, array<string|int, mixed> $parameters = [] ]) : void
Parameters
$message : string
$priority : string = LogLevel::INFO
$parameters : array<string|int, mixed> = []
Return values
void

Search results