From d362eb77ab1e5a8a2c564b05cb83adae5b3c277c Mon Sep 17 00:00:00 2001 From: Filipe Dobreira Date: Sat, 13 Apr 2013 11:57:10 +0200 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 9860511..2dc9cb9 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,44 @@ User [@hdias](https://github.com/hdias) contributed a simple guide/example to he https://gist.github.com/hdias/5169713#file-start-php +### Integrating with Zend Framework 2 + +User [@zsilbi](https://github.com/zsilbi) contributed a provider for ZF2 integration, +available in the following location: + +https://github.com/filp/whoops/tree/master/src/Whoops/Provider/Zend + +**Instructions:** + +- Add Whoops as a module to you app (/vendor/Whoops) +- Whoops must be the first module: + +```php +'modules' => array( + 'Whoops', + 'Application' + ) +``` + +- Move Module.php from /Whoops/Provider/Zend/Module.php to /Whoops/Module.php +- Use optional configurations in your controller config: + +```php +return array( + 'view_manager' => array( + 'display_not_found_reason' => true, + 'display_exceptions' => true, + 'json_exceptions' => array( + 'display' => true, + 'ajax_only' => true, + 'show_trace' => true + ) + ), +); +``` + +- NOTE: ob_clean(); is used to remove previous output, so you may use ob_start(); at the beginning of your app (index.php) + ### Available Handlers **whoops** currently ships with the following built-in handlers, available in the `Whoops\Handler` namespace: