Add PrettyPageHandler::showBranding(bool) to add ability to hide 'damnit' branding

This commit is contained in:
filp
2013-03-15 18:47:59 +00:00
parent 36f7839e2b
commit e5e6674438
3 changed files with 34 additions and 9 deletions
+8
View File
@@ -27,6 +27,14 @@ $app['debug'] = true;
if($app['debug']) {
$app->register(new DamnitServiceProvider);
// Example: Extend the error page to disable the 'damnit' branding
// in the top-right corner, so those big-wigs at the office wont'
// throw a tantrum:
$app['damnit.error_page_handler'] = $app->extend('damnit.error_page_handler', function($handler) {
$handler->showBranding(true);
return $handler;
});
}
$app->get('/', function() use($app) {