PHP 클래스 Phly\Conduit\FinalHandler

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

공개 메소드들

메소드 설명
__construct ( array $options = [] )
__invoke ( Request $request, Response $response, mixed $err = null ) : Response Handle incomplete requests

비공개 메소드들

메소드 설명
create404 ( Request $request, Response $response ) : Response Create a 404 status in the response
createDevelopmentErrorMessage ( $error )
getStatusCode ( mixed $error, Response $response ) : integer Determine status code
handleError ( mixed $error, Request $request, Response $response ) : Response Handle an error condition
triggerError ( mixed $error, Request $request, Response $response ) Trigger the error listener, if present

메소드 상세

__construct() 공개 메소드

public __construct ( array $options = [] )
$options array Options that change default override behavior.

__invoke() 공개 메소드

This handler should only ever be invoked if Next exhausts its stack. When that happens, we determine if an $err is present, and, if so, create a 500 status with error details. Otherwise, a 404 status is created.
public __invoke ( Request $request, Response $response, mixed $err = null ) : Response
$request Phly\Conduit\Http\Request Request instance.
$response Phly\Conduit\Http\Response Response instance.
$err mixed
리턴 Phly\Conduit\Http\Response