collection-crud/src/Kernel.php

50 lines
1.6 KiB
PHP
Raw Normal View History

2018-07-18 11:35:27 -04:00
<?php declare(strict_types=1);
2017-11-30 15:06:13 -05:00
2020-06-02 16:08:08 -04:00
/*
* 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 App;
2017-11-30 15:06:13 -05:00
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
2022-11-03 10:44:05 -04:00
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
2020-06-02 16:08:08 -04:00
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
2017-11-30 15:06:13 -05:00
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
2020-06-02 16:08:08 -04:00
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
2017-11-30 15:06:13 -05:00
class Kernel extends BaseKernel
2017-11-30 15:06:13 -05:00
{
2022-03-03 10:53:48 -05:00
use MicroKernelTrait;
2020-06-02 16:08:08 -04:00
2022-11-03 10:44:05 -04:00
protected function configureContainer(
ContainerConfigurator $container,
LoaderInterface $loader,
ContainerBuilder $builder
): void
2022-03-03 10:53:48 -05:00
{
2022-11-03 10:44:05 -04:00
$configDir = $this->getConfigDir();
2022-03-03 10:53:48 -05:00
$container->import('../config/{packages}/*.yaml');
$container->import('../config/{packages}/' . $this->environment . '/*.yaml');
2022-11-03 10:44:05 -04:00
$container->import('../config/{packages}/*.php');
$container->import('../config/{packages}/' . $this->environment . '/*.php');
$container->import('../config/{services}.php');
$container->import('../config/{services}_' . $this->environment . '.php');
2022-03-03 10:53:48 -05:00
}
2020-06-02 16:08:08 -04:00
2022-03-03 10:53:48 -05:00
protected function configureRoutes(RoutingConfigurator $routes): void
{
2022-11-03 10:44:05 -04:00
$routes->import('../config/{routes}/' . $this->environment . '/*.php');
$routes->import('../config/{routes}/*.php');
$routes->import('../config/{routes}.php');
2022-03-03 10:53:48 -05:00
}
2017-11-30 15:06:13 -05:00
}