PHP 클래스 Zend\Stratigility\Next

상속: implements Interop\Http\Middleware\DelegateInterface
파일 보기 프로젝트 열기: zendframework/zend-stratigility 1 사용 예제들

공개 메소드들

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