PHP 클래스 Phly\Conduit\Next

파일 보기 프로젝트 열기: phly/conduit

공개 메소드들

메소드 설명
__construct ( SplQueue $queue, callable $done )
__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.

비공개 메소드들

메소드 설명
getBorder ( string $path, string $route ) : string Determine the border between the request path and current route
getTruncatedPath ( string $segment, string $path ) : string Strip the segment from the start of the given path.
resetPath ( Request $request ) : Request Reset the path, if a segment was previously stripped
stripRouteFromPath ( Request $request, string $route ) : Request Strip the route from the request path

메소드 상세

__construct() 공개 메소드

public __construct ( SplQueue $queue, callable $done )
$queue SplQueue
$done callable

__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
리턴 Psr\Http\Message\ResponseInterface