From 35aae18e2ca523a070d7d2cee1f7442c227644bb Mon Sep 17 00:00:00 2001 From: Hassan Khan Date: Sun, 2 Feb 2014 02:07:30 +0000 Subject: [PATCH] Cleaning up ``WhoopsPlugin`` --- plugins/WhoopsPlugin.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/WhoopsPlugin.php b/plugins/WhoopsPlugin.php index f47a1d3..899d4aa 100644 --- a/plugins/WhoopsPlugin.php +++ b/plugins/WhoopsPlugin.php @@ -32,7 +32,6 @@ function() { return $handler; } ); - $container["whoopsSlimInfoHandler"] = $container->protect( function() use ($container) { @@ -83,6 +82,7 @@ function() use ($container) { } ); + // Add actual Whoops\Run object $container['whoops'] = $container->share( function($container) { $run = new Run(); @@ -93,7 +93,7 @@ function($container) { } ); - // Try to register Whoops handler, and set the callback function + // Try to register Whoops, and set the callback function try { $container['whoops']->register(); $container['router']->error(array($container['whoops'], Run::EXCEPTION_HANDLER)); @@ -104,23 +104,18 @@ function($container) { public function before_config_load(&$settings) { - // echo __CLASS__ . '::before_config_load'; } public function before_file_load(&$content_dir) { - // echo __CLASS__ . '::before_file_load'; } public function after_file_load(&$content) { - // $this->container['router']->error(array($container['whoops'], Run::EXCEPTION_HANDLER)); - // echo __CLASS__ . '::after_file_load'; } public function request_url(&$url) { - // echo __CLASS__ . '::request_url'; } }