trait MicroKernelTrait
A Kernel that provides configuration hooks.
configureRoutes(RouteCollectionBuilder $routes) Add or import routes into your application. | ||
configureContainer(ContainerBuilder $c, LoaderInterface $loader) Configures the container. | ||
registerContainerConfiguration(LoaderInterface $loader) {@inheritdoc} | ||
loadRoutes(LoaderInterface $loader) |
Add or import routes into your application.
$routes->import('config/routing.yml'); $routes->add('/admin', 'App\Controller\AdminController::dashboard', 'admin_dashboard');
RouteCollectionBuilder | $routes |
Configures the container.
You can register extensions:
$c->loadFromExtension('framework', array(
'secret' => '%secret%'
));
Or services:
$c->register('halloween', 'FooBundle\HalloweenProvider');
Or parameters:
$c->setParameter('halloween', 'lot of fun');
ContainerBuilder | $c | |
LoaderInterface | $loader |
{@inheritdoc}
LoaderInterface | $loader |
LoaderInterface | $loader |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.html