MicroKernelTrait
A Kernel that provides configuration hooks.
Tags
Table of Contents
- getCacheDir() : string
- {@inheritdoc}
- getLogDir() : string
- {@inheritdoc}
- registerBundles() : iteratable<string|int, mixed>
- {@inheritdoc}
- registerContainerConfiguration() : mixed
- {@inheritdoc}
- configureContainer() : void
- Configures the container.
- configureRoutes() : void
- Adds or imports routes into your application.
- getBundlesPath() : string
- Gets the path to the bundles configuration file.
- getConfigDir() : string
- Gets the path to the configuration directory.
Methods
getCacheDir()
{@inheritdoc}
public
getCacheDir() : string
Return values
string —getLogDir()
{@inheritdoc}
public
getLogDir() : string
Return values
string —registerBundles()
{@inheritdoc}
public
registerBundles() : iteratable<string|int, mixed>
Return values
iteratable<string|int, mixed> —registerContainerConfiguration()
{@inheritdoc}
public
registerContainerConfiguration(LoaderInterface $loader) : mixed
Parameters
- $loader : LoaderInterface
Return values
mixed —configureContainer()
Configures the container.
private
configureContainer(ContainerConfigurator $container, LoaderInterface $loader, ContainerBuilder $builder) : void
You can register extensions:
$container->extension('framework', [
'secret' => '%secret%'
]);
Or services:
$container->services()->set('halloween', 'FooBundle\HalloweenProvider');
Or parameters:
$container->parameters()->set('halloween', 'lot of fun');
Parameters
- $container : ContainerConfigurator
- $loader : LoaderInterface
- $builder : ContainerBuilder
Return values
void —configureRoutes()
Adds or imports routes into your application.
private
configureRoutes(RoutingConfigurator $routes) : void
$routes->import($this->getConfigDir().'/*.{yaml,php}'); $routes ->add('admin_dashboard', '/admin') ->controller('App\Controller\AdminController::dashboard') ;
Parameters
- $routes : RoutingConfigurator
Return values
void —getBundlesPath()
Gets the path to the bundles configuration file.
private
getBundlesPath() : string
Return values
string —getConfigDir()
Gets the path to the configuration directory.
private
getConfigDir() : string