Php - Symfony application Application with Symfony to display and save a PDF file generated from HTML code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.4 KiB

2 years ago
<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
2 years ago
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
2 years ago
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
2 years ago
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
2 years ago
class Kernel extends BaseKernel
{
use MicroKernelTrait;
2 years ago
protected function configureContainer(ContainerConfigurator $container): void
2 years ago
{
2 years ago
$container->import('../config/{packages}/*.yaml');
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
$container->import('../config/services.yaml');
2 years ago
$container->import('../config/{services}_'.$this->environment.'.yaml');
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
(require $path)($container->withPath($path), $this);
2 years ago
}
}
2 years ago
protected function configureRoutes(RoutingConfigurator $routes): void
2 years ago
{
2 years ago
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
$routes->import('../config/{routes}/*.yaml');
2 years ago
2 years ago
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
$routes->import('../config/routes.yaml');
2 years ago
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
(require $path)($routes->withPath($path), $this);
}
2 years ago
}
}