PHP 클래스 Psr7Middlewares\Middleware\AccessLog

파일 보기 프로젝트 열기: oscarotero/psr7-middlewares

공개 메소드들

메소드 설명
__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