MicroKernelTrait
A Kernel that provides configuration hooks.
Tags
Table of Contents
- registerContainerConfiguration() : mixed
- {@inheritdoc}
- configureContainer() : mixed
- Configures the container.
- configureRoutes() : mixed
- Add or import routes into your application.
Methods
registerContainerConfiguration()
{@inheritdoc}
public
registerContainerConfiguration(LoaderInterface $loader) : mixed
Parameters
- $loader : LoaderInterface
Return values
mixed —configureContainer()
Configures the container.
protected
abstract configureContainer(ContainerBuilder $c, LoaderInterface $loader) : mixed
You can register extensions:
$c->loadFromExtension('framework', [
'secret' => '%secret%'
]);
Or services:
$c->register('halloween', 'FooBundle\HalloweenProvider');
Or parameters:
$c->setParameter('halloween', 'lot of fun');
Parameters
- $c : ContainerBuilder
- $loader : LoaderInterface
Return values
mixed —configureRoutes()
Add or import routes into your application.
protected
abstract configureRoutes(RouteCollectionBuilder $routes) : mixed
$routes->import('config/routing.yml'); $routes->add('/admin', 'App\Controller\AdminController::dashboard', 'admin_dashboard');
Parameters
- $routes : RouteCollectionBuilder