PHP 클래스 Dingo\Api\Exception\Handler

상속: implements Dingo\Api\Contract\Debug\ExceptionHandler, implements Illuminate\Contracts\Debug\ExceptionHandler
파일 보기 프로젝트 열기: dingo/api 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$debug boolean Indicates if we are in debug mode.
$format array Generic response format.
$handlers array Array of exception handlers.
$parentHandler Illuminate\Contracts\Debug\ExceptionHandler The parent Illuminate exception handler instance.
$replacements array User defined replacements to merge with defaults.

공개 메소드들

메소드 설명
__construct ( Illuminate\Contracts\Debug\ExceptionHandler $parentHandler, array $format, boolean $debug ) : void Create a new exception handler instance.
getHandlers ( ) : array Get the exception handlers.
handle ( Exception $exception ) : Illuminate\Http\Response Handle an exception if it has an existing handler.
register ( callable $callback ) : void Register a new exception handler.
render ( Dingo\Api\Http\Request $request, Exception $exception ) : mixed Render an exception into an HTTP response.
renderForConsole ( Symfony\Component\Console\Output\OutputInterface $output, Exception $exception ) : mixed Render an exception to the console.
report ( Exception $exception ) : void Report or log an exception.
setDebug ( boolean $debug ) : void Set the debug mode.
setErrorFormat ( array $format ) : void Set the error format array.
setReplacements ( array $replacements ) : void Set user defined replacements.

보호된 메소드들

메소드 설명
genericResponse ( Exception $exception ) : Illuminate\Http\Response Handle a generic error response if there is no handler available.
getExceptionStatusCode ( Exception $exception, integer $defaultStatusCode = 500 ) : integer Get the exception status code.
getHeaders ( Exception $exception ) : array Get the headers from the exception.
getStatusCode ( Exception $exception ) : integer Get the status code from the exception.
handlerHint ( callable $callback ) : string Get the hint for an exception handler.
newResponseArray ( ) : array Create a new response array with replacement values.
prepareReplacements ( Exception $exception ) : array Prepare the replacements array by gathering the keys and values.
recursivelyRemoveEmptyReplacements ( array $input ) : array Recursirvely remove any empty replacement values in the response array.
runningInDebugMode ( ) : boolean Determines if we are running in debug mode.

메소드 상세

__construct() 공개 메소드

Create a new exception handler instance.
public __construct ( Illuminate\Contracts\Debug\ExceptionHandler $parentHandler, array $format, boolean $debug ) : void
$parentHandler Illuminate\Contracts\Debug\ExceptionHandler
$format array
$debug boolean
리턴 void

genericResponse() 보호된 메소드

Handle a generic error response if there is no handler available.
protected genericResponse ( Exception $exception ) : Illuminate\Http\Response
$exception Exception
리턴 Illuminate\Http\Response

getExceptionStatusCode() 보호된 메소드

Get the exception status code.
protected getExceptionStatusCode ( Exception $exception, integer $defaultStatusCode = 500 ) : integer
$exception Exception
$defaultStatusCode integer
리턴 integer

getHandlers() 공개 메소드

Get the exception handlers.
public getHandlers ( ) : array
리턴 array

getHeaders() 보호된 메소드

Get the headers from the exception.
protected getHeaders ( Exception $exception ) : array
$exception Exception
리턴 array

getStatusCode() 보호된 메소드

Get the status code from the exception.
protected getStatusCode ( Exception $exception ) : integer
$exception Exception
리턴 integer

handle() 공개 메소드

Handle an exception if it has an existing handler.
public handle ( Exception $exception ) : Illuminate\Http\Response
$exception Exception
리턴 Illuminate\Http\Response

handlerHint() 보호된 메소드

Get the hint for an exception handler.
protected handlerHint ( callable $callback ) : string
$callback callable
리턴 string

newResponseArray() 보호된 메소드

Create a new response array with replacement values.
protected newResponseArray ( ) : array
리턴 array

prepareReplacements() 보호된 메소드

Prepare the replacements array by gathering the keys and values.
protected prepareReplacements ( Exception $exception ) : array
$exception Exception
리턴 array

recursivelyRemoveEmptyReplacements() 보호된 메소드

Recursirvely remove any empty replacement values in the response array.
protected recursivelyRemoveEmptyReplacements ( array $input ) : array
$input array
리턴 array

register() 공개 메소드

Register a new exception handler.
public register ( callable $callback ) : void
$callback callable
리턴 void

render() 공개 메소드

Render an exception into an HTTP response.
public render ( Dingo\Api\Http\Request $request, Exception $exception ) : mixed
$request Dingo\Api\Http\Request
$exception Exception
리턴 mixed

renderForConsole() 공개 메소드

Render an exception to the console.
public renderForConsole ( Symfony\Component\Console\Output\OutputInterface $output, Exception $exception ) : mixed
$output Symfony\Component\Console\Output\OutputInterface
$exception Exception
리턴 mixed

report() 공개 메소드

Report or log an exception.
public report ( Exception $exception ) : void
$exception Exception
리턴 void

runningInDebugMode() 보호된 메소드

Determines if we are running in debug mode.
protected runningInDebugMode ( ) : boolean
리턴 boolean

setDebug() 공개 메소드

Set the debug mode.
public setDebug ( boolean $debug ) : void
$debug boolean
리턴 void

setErrorFormat() 공개 메소드

Set the error format array.
public setErrorFormat ( array $format ) : void
$format array
리턴 void

setReplacements() 공개 메소드

Set user defined replacements.
public setReplacements ( array $replacements ) : void
$replacements array
리턴 void

프로퍼티 상세

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

Indicates if we are in debug mode.
protected bool $debug
리턴 boolean

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

Generic response format.
protected array $format
리턴 array

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

Array of exception handlers.
protected array $handlers
리턴 array

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

The parent Illuminate exception handler instance.
protected ExceptionHandler,Illuminate\Contracts\Debug $parentHandler
리턴 Illuminate\Contracts\Debug\ExceptionHandler

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

User defined replacements to merge with defaults.
protected array $replacements
리턴 array