collection-crud/src/Kernel.php

48 lines
1.5 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
2023-07-21 10:35:15 -04:00
class Kernel extends BaseKernel {
use MicroKernelTrait;
2020-06-02 16:08:08 -04:00
2023-07-21 10:35:15 -04:00
protected function configureContainer(
2022-11-03 10:44:05 -04:00
ContainerConfigurator $container,
LoaderInterface $loader,
ContainerBuilder $builder
2023-07-21 10:35:15 -04:00
): void {
2022-11-03 10:44:05 -04:00
$configDir = $this->getConfigDir();
2023-07-21 10:35:15 -04: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');
2023-07-21 10:35:15 -04:00
}
protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->import('../config/{routes}/' . $this->environment . '/*.php');
$routes->import('../config/{routes}/*.php');
$routes->import('../config/{routes}.php');
}
2017-11-30 15:06:13 -05:00
}