{"action":"created","issue":{"url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/8","labels_url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/8/comments","events_url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/8/events","html_url":"https://github.com/zeuxisoo/php-slim-whoops/issues/8","id":62357421,"number":8,"title":"How I can enable/disable the JsonResponseHandler ?","user":{"login":"borgogelli","id":7045594,"avatar_url":"https://avatars.githubusercontent.com/u/7045594?v=3","gravatar_id":"","url":"https://api.github.com/users/borgogelli","html_url":"https://github.com/borgogelli","followers_url":"https://api.github.com/users/borgogelli/followers","following_url":"https://api.github.com/users/borgogelli/following{/other_user}","gists_url":"https://api.github.com/users/borgogelli/gists{/gist_id}","starred_url":"https://api.github.com/users/borgogelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgogelli/subscriptions","organizations_url":"https://api.github.com/users/borgogelli/orgs","repos_url":"https://api.github.com/users/borgogelli/repos","events_url":"https://api.github.com/users/borgogelli/events{/privacy}","received_events_url":"https://api.github.com/users/borgogelli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-17T10:37:19Z","updated_at":"2015-03-17T17:31:21Z","closed_at":null,"body":"How I can enable/disable the JsonResponseHandler ?\r\n\r\nThank you in advance\r\n\r\nGreeting from Italy\r\n\r\nAndrea"},"comment":{"url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/comments/82490304","html_url":"https://github.com/zeuxisoo/php-slim-whoops/issues/8#issuecomment-82490304","issue_url":"https://api.github.com/repos/zeuxisoo/php-slim-whoops/issues/8","id":82490304,"user":{"login":"borgogelli","id":7045594,"avatar_url":"https://avatars.githubusercontent.com/u/7045594?v=3","gravatar_id":"","url":"https://api.github.com/users/borgogelli","html_url":"https://github.com/borgogelli","followers_url":"https://api.github.com/users/borgogelli/followers","following_url":"https://api.github.com/users/borgogelli/following{/other_user}","gists_url":"https://api.github.com/users/borgogelli/gists{/gist_id}","starred_url":"https://api.github.com/users/borgogelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgogelli/subscriptions","organizations_url":"https://api.github.com/users/borgogelli/orgs","repos_url":"https://api.github.com/users/borgogelli/repos","events_url":"https://api.github.com/users/borgogelli/events{/privacy}","received_events_url":"https://api.github.com/users/borgogelli/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T17:31:21Z","updated_at":"2015-03-17T17:31:21Z","body":"I can't understand the following code...\r\n\r\n<code>\r\nclass WhoopsMiddleware extends Middleware { \r\n....\r\n  $app->container->singleton('whoopsJsonResponseHandler', function() {\r\n                $handler = new JsonResponseHandler();\r\n                $handler->onlyForAjaxRequests(true);\r\n                return $handler;\r\n            });\r\n....\r\n</code>\r\n\r\nis the JsonResponseHandler always available ?\r\n\r\nwe like to use two handlers like in the following code:\r\n\r\n$whoops->pushHandler(new Whoops\\Handler\\PrettyPageHandler);\r\n$whoops->pushHandler(new Whoops\\Handler\\JsonResponseHandler)\r\n"}}