Added JSONHandler to the README.
This commit is contained in:
parent
f2617be261
commit
c740938a0d
1 changed files with 18 additions and 1 deletions
19
README.md
19
README.md
|
@ -218,7 +218,7 @@ abstract class Handler {
|
|||
|
||||
_CONTENT\_TYPE_: The mime type of the content that is output by the handler
|
||||
|
||||
_BUBBLES_: When returned within the output bitmask, it causes the stack loop to continue onto the next handler after handling; this is a default behavior.
|
||||
_BUBBLES_: When returned within the output bitmask, it causes the stack loop to continue onto the next handler after handling; this is the default behavior.
|
||||
_EXIT_: When returned within the output bitmask, it causes Catcher to exit after running all handlers.
|
||||
_LOG_: When returned within the output bitmask, it causes Catcher to log the output to a supplied logger.
|
||||
_NOW_: When returned within the output bitmask, it causes Catcher to have the handler immediately be invoked.
|
||||
|
@ -323,6 +323,23 @@ Returns the previous `ThrowableController` if there is one
|
|||
Returns the throwable controlled by this class instance
|
||||
|
||||
|
||||
### MensBeam\Catcher\JSONHandler ###
|
||||
|
||||
```php
|
||||
namespace MensBeam\Catcher;
|
||||
|
||||
class JSONHandler extends Handler {
|
||||
public const CONTENT_TYPE = 'application/json';
|
||||
|
||||
protected bool $_prettyPrint = true;
|
||||
}
|
||||
```
|
||||
|
||||
#### Options ####
|
||||
|
||||
_prettyPrint_: If true the handler will pretty print JSON output. Defaults to _true_.
|
||||
|
||||
|
||||
### MensBeam\Catcher\PlainTextHandler ###
|
||||
|
||||
```php
|
||||
|
|
Loading…
Reference in a new issue