joseki / error-presenter-extension
Dynamic error presenter loader extension
Installs: 5 678
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Suggests
- nette/nette: PHP framework to which this extension belongs to.
This package is auto-updated.
Last update: 2024-12-05 21:10:12 UTC
README
This extension sets dynamically error presenters for Nette Framework applications.
If you have a presenter Application:Admin:Products
(with an action e.g. Application:Admin:Products:default
), and your default error presenter name is DefaultErrorPresenter
, then ErrorPresenterFactory
will set the closest existing error presenter for given action as follows:
- Application:Admin:Error
- Application:Error
- DefaultError (default)
Installation
The best way to install is using Composer:
$ composer require joseki/error-presenter-extension:@stable
Usage
# config.neon
extensions:
ErrorPresenter: Joseki\Application\DI\ErrorPresenterExtension
nette:
application:
# you can use any nette-like presenter name e.g. Application:Error
errorPresenter: 'Error'