PHP Класс Psr7Middlewares\Middleware\AccessLog

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Psr\Log\LoggerInterface $logger ) Set the LoggerInterface instance.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
combined ( boolean $combined = true ) : self Whether use the combined log format instead the common log format.

Приватные методы

Метод Описание
combinedFormat ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : string Generates a message using the Apache's Combined Log format This is exactly the same than Common Log, with the addition of two more fields: Referer and User-Agent headers.
commonFormat ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : string Generates a message using the Apache's Common Log format https://httpd.apache.org/docs/2.4/logs.html#accesslog.

Описание методов

__construct() публичный Метод

Set the LoggerInterface instance.
public __construct ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

__invoke() публичный Метод

Execute the middleware.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
Результат Psr\Http\Message\ResponseInterface

combined() публичный Метод

Whether use the combined log format instead the common log format.
public combined ( boolean $combined = true ) : self
$combined boolean
Результат self