We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExceptionResponder
It can make several ways.
One / Container + Callable
Configuration:
$exceptionMap = [ MyNotFoundException::class => MyExceptionHandler::class, ];
Handling: get MyExceptionHandler class from container and run as callable (use __invoke()) via injector.
MyExceptionHandler
__invoke()
Two / Container + Interface
Add new interface ExceptionHandlerInterface with method createResponse(Throwable $e): ResponseInterface.
ExceptionHandlerInterface
createResponse(Throwable $e): ResponseInterface
Handling: get MyExceptionHandler class from container and run createResponse().
createResponse()
Three / Array Definition + Callable
Add support of array definitions:
$exceptionMap = [ MyNotFoundException::class => [ 'class' => MyExceptionHandler::class, '__construct()' => [ ... ], ], ];
Handling: resolve array definition via yiisoft/definitions and run as callable (use __invoke()) via injector.
yiisoft/definitions
Four / Array Definition + Interface
Handling: resolve array definition via yiisoft/definitions and run createResponse().
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It can make several ways.
One / Container + Callable
Configuration:
$exceptionMap = [ MyNotFoundException::class => MyExceptionHandler::class, ];
Handling: get
MyExceptionHandler
class from container and run as callable (use__invoke()
) via injector.Two / Container + Interface
Configuration:
$exceptionMap = [ MyNotFoundException::class => MyExceptionHandler::class, ];
Add new interface
ExceptionHandlerInterface
with methodcreateResponse(Throwable $e): ResponseInterface
.Handling: get
MyExceptionHandler
class from container and runcreateResponse()
.Three / Array Definition + Callable
Add support of array definitions:
Handling: resolve array definition via
yiisoft/definitions
and run as callable (use__invoke()
) via injector.Four / Array Definition + Interface
Add support of array definitions:
Add new interface
ExceptionHandlerInterface
with methodcreateResponse(Throwable $e): ResponseInterface
.Handling: resolve array definition via
yiisoft/definitions
and runcreateResponse()
.The text was updated successfully, but these errors were encountered: