Slide 37
Slide 37 text
Kernel
Symfony\Component\HttpKernel\Kernel
Build Container
protected
function
initializeContainer()
{
$class
=
$this-‐>getContainerClass();
$cache
=
new
ConfigCache($this-‐>getCacheDir().'/'.$class.'.php',
$this-‐>debug);
$fresh
=
true;
if
(!$cache-‐>isFresh())
{
$container
=
$this-‐>buildContainer();
$container-‐>compile();
$this-‐>dumpContainer(
$cache,
$container,
$class,
$this-‐>getContainerBaseClass()
);
$fresh
=
false;
}
require_once
$cache;
$this-‐>container
=
new
$class();
$this-‐>container-‐>set('kernel',
$this);
[…]
}