Documentation

MicroKernelTrait

A Kernel that provides configuration hooks.

Tags
author

Ryan Weaver ryan@knpuniversity.com

author

Fabien Potencier fabien@symfony.com

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>

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
Return values
string

Search results