BodyParsingMiddleware
extends BaseMiddleware
in package
Table of Contents
- $logger : LoggerInterface
- $request : ServerRequestInterface
- HTTP request
- __construct() : mixed
- process() : ResponseInterface
- abstracts away logic needed for all other middlewares
- processRequest() : ResponseInterface
- Process an incoming server request
- getMethod() : string
- gets method of the request
- getPath() : string
- gets path of the request
- getSession() : object
- returns session object with token data
Properties
$logger
protected
LoggerInterface
$logger
$request
HTTP request
protected
ServerRequestInterface
$request
Methods
__construct()
public
__construct(LoggerInterface $logger) : mixed
Parameters
- $logger : LoggerInterface
Return values
mixed —process()
abstracts away logic needed for all other middlewares
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterface —processRequest()
Process an incoming server request
public
processRequest(RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $handler : RequestHandlerInterface
Return values
ResponseInterface —getMethod()
gets method of the request
protected
getMethod() : string
Return values
string —getPath()
gets path of the request
protected
getPath() : string
Return values
string —getSession()
returns session object with token data
protected
getSession() : object