PHP 클래스 TheSeer\phpDox\ErrorHandler

파일 보기 프로젝트 열기: theseer/phpdox 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Version $version ) ErrorHandler constructor.
__destruct ( ) : void Destructor
clearLastError ( )
handleError ( integer $errno, string $errstr, string $errfile, integer $errline ) General System error handler
handleException ( Exception | Throwable $exception ) : void System Exception Handler
handleShutdown ( ) : void System shutdown handler
register ( ) : void Init method

비공개 메소드들

메소드 설명
getLastError ( ) : array This method implements a workaround for PHP < 7 where no error_clear_last() exists by considering a last error of type E_USER_NOTICE as "cleared".
renderException ( Exception | Throwable $exception )

메소드 상세

__construct() 공개 메소드

ErrorHandler constructor.
public __construct ( Version $version )
$version Version

__destruct() 공개 메소드

Destructor
public __destruct ( ) : void
리턴 void

clearLastError() 공개 메소드

public clearLastError ( )

handleError() 공개 메소드

Capture error messages and transform them into an exception
public handleError ( integer $errno, string $errstr, string $errfile, integer $errline )
$errno integer Error code
$errstr string Error message
$errfile string Filename error occured in
$errline integer Line of error

handleException() 공개 메소드

System Exception Handler
public handleException ( Exception | Throwable $exception ) : void
$exception Exception | Throwable The exception to handle
리턴 void

handleShutdown() 공개 메소드

Used to grab fatal errors and handle them gracefully
public handleShutdown ( ) : void
리턴 void

register() 공개 메소드

Register shutdown, exception and error handler
public register ( ) : void
리턴 void