PHP Класс Zend\Stratigility\Next

Наследование: implements Interop\Http\Middleware\DelegateInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( SplQueue $queue, callable | Interop\Http\Middleware\DelegateInterface $done ) Constructor.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, null | mixed $err = null ) : Psr\Http\Message\ResponseInterface Call the next Route in the queue.
process ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\ResponseInterface
raiseThrowables ( ) : void Toggle the "raise throwables" flag on.
setResponsePrototype ( Psr\Http\Message\ResponseInterface $prototype ) : void

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

Метод Описание
dispatchNextDelegate ( callable | Interop\Http\Middleware\DelegateInterface $nextDelegate, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, mixed $err = null ) : Psr\Http\Message\ResponseInterface Dispatch the next delegate.
getBorder ( string $path, string $route ) : string Determine the border between the request path and current route
getResponsePrototype ( ) : Psr\Http\Message\ResponseInterface
getTruncatedPath ( string $segment, string $path ) : string Strip the segment from the start of the given path.
raiseThrowableFromError ( mixed $err )
resetPath ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\RequestInterface Reset the path, if a segment was previously stripped
stripRouteFromPath ( Psr\Http\Message\RequestInterface $request, string $route ) : Psr\Http\Message\RequestInterface Strip the route from the request path
triggerErrorDeprecation ( )
validateServerRequest ( Psr\Http\Message\RequestInterface $request ) : boolean

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

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

Clones the queue provided to allow re-use.
public __construct ( SplQueue $queue, callable | Interop\Http\Middleware\DelegateInterface $done )
$queue SplQueue
$done callable | Interop\Http\Middleware\DelegateInterface Next delegate to invoke when the queue is exhausted. Note: this argument becomes optional starting in 2.0.0.

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

Next requires that a request and response are provided; these will be passed to any middleware invoked, including the $done callable, if invoked. If the $err value is not null, the invocation is considered to be an error invocation, and Next will search for the next error middleware to dispatch, passing it $err along with the request and response. Once dispatch is complete, if the result is a response instance, that value will be returned; otherwise, the currently registered response instance will be returned.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, null | mixed $err = null ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$err null | mixed This argument is deprecated as of 1.3.0, and will be removed in 2.0.0.
Результат Psr\Http\Message\ResponseInterface

process() публичный метод

public process ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface
Результат Psr\Http\Message\ResponseInterface

raiseThrowables() публичный метод

Toggle the "raise throwables" flag on.
public raiseThrowables ( ) : void
Результат void

setResponsePrototype() публичный метод

public setResponsePrototype ( Psr\Http\Message\ResponseInterface $prototype ) : void
$prototype Psr\Http\Message\ResponseInterface
Результат void