class AddClassesToCachePass in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/DependencyInjection/AddClassesToCachePass.php \Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass
Sets the classes to compile in the cache for the container.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass implements CompilerPassInterface
Expanded class hierarchy of AddClassesToCachePass
1 file declares its use of AddClassesToCachePass
- Kernel.php in vendor/
symfony/ http-kernel/ Kernel.php
File
- vendor/
symfony/ http-kernel/ DependencyInjection/ AddClassesToCachePass.php, line 23
Namespace
Symfony\Component\HttpKernel\DependencyInjectionView source
class AddClassesToCachePass implements CompilerPassInterface {
private $kernel;
public function __construct(Kernel $kernel) {
$this->kernel = $kernel;
}
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container) {
$classes = array();
foreach ($container
->getExtensions() as $extension) {
if ($extension instanceof Extension) {
$classes = array_merge($classes, $extension
->getClassesToCompile());
}
}
$this->kernel
->setClassCache(array_unique($container
->getParameterBag()
->resolveValue($classes)));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AddClassesToCachePass:: |
private | property | ||
AddClassesToCachePass:: |
public | function |
You can modify the container here before it is dumped to PHP code. Overrides CompilerPassInterface:: |
|
AddClassesToCachePass:: |
public | function |