public function ContainerBuilder::addCompilerPass in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass()
Adds a compiler pass.
@api
Parameters
CompilerPassInterface $pass A compiler pass:
string $type The type of compiler pass:
Return value
ContainerBuilder The current instance
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php, line 318
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) {
$this
->getCompiler()
->addPass($pass, $type);
$this
->addObjectResource($pass);
return $this;
}