\Pydio\Core\Http\MiddlewareSapiMiddleware

Class SapiMiddleware: main middleware for http requests Pydio core is organized following the PSR-7 pattern, that defines HTTP message interfaces and concentric middlewares that carry around these interfaces.

Summary

Methods
Properties
Constants
handleRequest()
emitResponse()
No public properties found
No constants found
parseRequestRouteAndParams()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

handleRequest()

handleRequest(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, callable|null  $next = null) : \Psr\Http\Message\ResponseInterface

Standard interface for PSR-7 Middleware

Parameters

\Psr\Http\Message\ServerRequestInterface $request

Interface that encapsulate http request parameters

\Psr\Http\Message\ResponseInterface $response

Interface encapsulating the response

callable|null $next

Next middleware to call

Throws

\Pydio\Core\Exception\PydioException

Returns

\Psr\Http\Message\ResponseInterface —

Returns the modified response interface.

emitResponse()

emitResponse(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : void

Output the response to the browser, if no headers were already sent.

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $response

parseRequestRouteAndParams()

parseRequestRouteAndParams(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $responseInterface) 

Parameters

\Psr\Http\Message\ServerRequestInterface $request
\Psr\Http\Message\ResponseInterface $responseInterface