Skip to content

Commit

Permalink
removed container dependency for the web debug toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 16, 2010
1 parent 61a8fc3 commit f815a6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Expand Up @@ -2,7 +2,6 @@

namespace Symfony\Components\HttpKernel\Listener;

use Symfony\Components\DependencyInjection\ContainerInterface;
use Symfony\Components\EventDispatcher\EventDispatcher;
use Symfony\Components\EventDispatcher\Event;
use Symfony\Components\HttpKernel\Response;
Expand All @@ -27,12 +26,10 @@
*/
class WebDebugToolbar
{
protected $container;
protected $profiler;

public function __construct(ContainerInterface $container, Profiler $profiler)
public function __construct(Profiler $profiler)
{
$this->container = $container;
$this->profiler = $profiler;
}

Expand All @@ -52,7 +49,7 @@ public function handle(Event $event, Response $response)
return $response;
}

$request = $this->container->getRequestService();
$request = $event->getParameter('request');

if ('3' === substr($response->getStatusCode(), 0, 1)
|| ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
Expand Down
Expand Up @@ -11,7 +11,6 @@
<services>
<service id="debug.toolbar" class="%debug.toolbar.class%">
<annotation name="kernel.listener" />
<argument type="service" id="service_container" />
<argument type="service" id="profiler" />
</service>
</services>
Expand Down

0 comments on commit f815a6a

Please sign in to comment.