PHP 클래스 Autarky\Errors\ErrorHandlerManager

상속: implements Autarky\Errors\ErrorHandlerManagerInterface
파일 보기 프로젝트 열기: autarky/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$defaultHandler Autarky\Errors\ErrorHandlerInterface | null
$handlers SplDoublyLinkedList
$resolver HandlerResolver
$rethrow boolean Re-throw exceptions rather than handling them.

공개 메소드들

메소드 설명
__construct ( HandlerResolver $resolver )
appendHandler ( $handler )
handle ( Exception $exception )
handleError ( integer $level, string $message, string $file = '', integer $line, array $context = [] ) Handle a PHP error.
handleShutdown ( ) : void Handle a PHP fatal error.
handleUncaught ( Exception $exception ) : Response Handle an uncaught exception. Does the same as handle(), but also sends the response, as we can assume that the exception happened outside of HttpKernelInterface::handle.
prependHandler ( $handler )
register ( )
setDefaultHandler ( Autarky\Errors\ErrorHandlerInterface $handler )
setRethrow ( $rethrow )
throwFatalErrorException ( ) : void Throw a FatalErrorException if an error has occured.

보호된 메소드들

메소드 설명
callHandler ( mixed $handler, Exception $exception ) : mixed Call an exception handler.
checkHandler ( $handler )
makeFatalErrorException ( ) : Symfony\Component\Debug\Exception\FatalErrorException | null Create a FatalErrorException out of the information stored on the last PHP error.
makeResponse ( mixed $response, Exception $exception ) : Response Transform an exception handler's response into a Response object.
matchesTypehint ( callable | Autarky\Errors\ErrorHandlerInterface $handler, Exception $exception ) : boolean Check if a handler's argument typehint matches an exception.

메소드 상세

__construct() 공개 메소드

public __construct ( HandlerResolver $resolver )
$resolver HandlerResolver

appendHandler() 공개 메소드

public appendHandler ( $handler )

callHandler() 보호된 메소드

Call an exception handler.
protected callHandler ( mixed $handler, Exception $exception ) : mixed
$handler mixed
$exception Exception
리턴 mixed

checkHandler() 보호된 메소드

protected checkHandler ( $handler )

handle() 공개 메소드

public handle ( Exception $exception )
$exception Exception

handleError() 공개 메소드

Handle a PHP error.
public handleError ( integer $level, string $message, string $file = '', integer $line, array $context = [] )
$level integer
$message string
$file string
$line integer
$context array

handleShutdown() 공개 메소드

Handle a PHP fatal error.
public handleShutdown ( ) : void
리턴 void

handleUncaught() 공개 메소드

Handle an uncaught exception. Does the same as handle(), but also sends the response, as we can assume that the exception happened outside of HttpKernelInterface::handle.
public handleUncaught ( Exception $exception ) : Response
$exception Exception
리턴 Symfony\Component\HttpFoundation\Response

makeFatalErrorException() 보호된 메소드

Create a FatalErrorException out of the information stored on the last PHP error.
protected makeFatalErrorException ( ) : Symfony\Component\Debug\Exception\FatalErrorException | null
리턴 Symfony\Component\Debug\Exception\FatalErrorException | null

makeResponse() 보호된 메소드

Transform an exception handler's response into a Response object.
protected makeResponse ( mixed $response, Exception $exception ) : Response
$response mixed
$exception Exception
리턴 Symfony\Component\HttpFoundation\Response

matchesTypehint() 보호된 메소드

Check if a handler's argument typehint matches an exception.
protected matchesTypehint ( callable | Autarky\Errors\ErrorHandlerInterface $handler, Exception $exception ) : boolean
$handler callable | Autarky\Errors\ErrorHandlerInterface
$exception Exception
리턴 boolean

prependHandler() 공개 메소드

public prependHandler ( $handler )

register() 공개 메소드

public register ( )

setDefaultHandler() 공개 메소드

public setDefaultHandler ( Autarky\Errors\ErrorHandlerInterface $handler )
$handler Autarky\Errors\ErrorHandlerInterface

setRethrow() 공개 메소드

public setRethrow ( $rethrow )

throwFatalErrorException() 공개 메소드

Throw a FatalErrorException if an error has occured.
public throwFatalErrorException ( ) : void
리턴 void

프로퍼티 상세

$defaultHandler 보호되어 있는 프로퍼티

protected ErrorHandlerInterface,Autarky\Errors|null $defaultHandler
리턴 Autarky\Errors\ErrorHandlerInterface | null

$handlers 보호되어 있는 프로퍼티

protected SplDoublyLinkedList $handlers
리턴 SplDoublyLinkedList

$resolver 보호되어 있는 프로퍼티

protected HandlerResolver,Autarky\Errors $resolver
리턴 HandlerResolver

$rethrow 보호되어 있는 프로퍼티

Re-throw exceptions rather than handling them.
protected bool $rethrow
리턴 boolean