Skip to content

Commit

Permalink
Move AjaxCollector for use without framework bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubinix authored and fabpot committed Oct 2, 2015
1 parent 2ff0f97 commit c227806
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
Expand Up @@ -11,24 +11,13 @@

namespace Symfony\Bundle\FrameworkBundle\DataCollector;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
use Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector as BaseAjaxDataCollector;

/**
* AjaxDataCollector.
*
* @author Bart van den Burg <bart@burgov.nl>
*/
class AjaxDataCollector extends DataCollector
class AjaxDataCollector extends BaseAjaxDataCollector
{
public function collect(Request $request, Response $response, \Exception $exception = null)
{
// all collecting is done client side
}

public function getName()
{
return 'ajax';
}
}
Expand Up @@ -26,7 +26,7 @@
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="335" />
</service>

<service id="data_collector.ajax" class="Symfony\Bundle\FrameworkBundle\DataCollector\AjaxDataCollector" public="false">
<service id="data_collector.ajax" class="Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="315" />
</service>

Expand Down
@@ -0,0 +1,33 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\HttpKernel\DataCollector;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

/**
* AjaxDataCollector.
*
* @author Bart van den Burg <bart@burgov.nl>
*/
class AjaxDataCollector extends DataCollector
{
public function collect(Request $request, Response $response, \Exception $exception = null)
{
// all collecting is done client side
}

public function getName()
{
return 'ajax';
}
}

0 comments on commit c227806

Please sign in to comment.