Ajout des vendor
This commit is contained in:
35
vendor/symfony/framework-bundle/DataCollector/AbstractDataCollector.php
vendored
Normal file
35
vendor/symfony/framework-bundle/DataCollector/AbstractDataCollector.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?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\Bundle\FrameworkBundle\DataCollector;
|
||||
|
||||
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||
|
||||
/**
|
||||
* @author Laurent VOULLEMIER <laurent.voullemier@gmail.com>
|
||||
*/
|
||||
abstract class AbstractDataCollector extends DataCollector implements TemplateAwareDataCollectorInterface
|
||||
{
|
||||
public function getName(): string
|
||||
{
|
||||
return static::class;
|
||||
}
|
||||
|
||||
public function reset(): void
|
||||
{
|
||||
$this->data = [];
|
||||
}
|
||||
|
||||
public static function getTemplate(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
37
vendor/symfony/framework-bundle/DataCollector/RouterDataCollector.php
vendored
Normal file
37
vendor/symfony/framework-bundle/DataCollector/RouterDataCollector.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?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\Bundle\FrameworkBundle\DataCollector;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\RedirectController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouterDataCollector;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class RouterDataCollector extends BaseRouterDataCollector
|
||||
{
|
||||
public function guessRoute(Request $request, $controller)
|
||||
{
|
||||
if (\is_array($controller)) {
|
||||
$controller = $controller[0];
|
||||
}
|
||||
|
||||
if ($controller instanceof RedirectController) {
|
||||
return $request->attributes->get('_route');
|
||||
}
|
||||
|
||||
return parent::guessRoute($request, $controller);
|
||||
}
|
||||
}
|
22
vendor/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php
vendored
Normal file
22
vendor/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<?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\Bundle\FrameworkBundle\DataCollector;
|
||||
|
||||
use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
|
||||
|
||||
/**
|
||||
* @author Laurent VOULLEMIER <laurent.voullemier@gmail.com>
|
||||
*/
|
||||
interface TemplateAwareDataCollectorInterface extends DataCollectorInterface
|
||||
{
|
||||
public static function getTemplate(): ?string;
|
||||
}
|
Reference in New Issue
Block a user