Compiler.php in Service Container 7
File
modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Compiler/Compiler.php
View source
<?php
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class Compiler {
private $passConfig;
private $log = array();
private $loggingFormatter;
private $serviceReferenceGraph;
public function __construct() {
$this->passConfig = new PassConfig();
$this->serviceReferenceGraph = new ServiceReferenceGraph();
$this->loggingFormatter = new LoggingFormatter();
}
public function getPassConfig() {
return $this->passConfig;
}
public function getServiceReferenceGraph() {
return $this->serviceReferenceGraph;
}
public function getLoggingFormatter() {
return $this->loggingFormatter;
}
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) {
$this->passConfig
->addPass($pass, $type);
}
public function addLogMessage($string) {
$this->log[] = $string;
}
public function getLog() {
return $this->log;
}
public function compile(ContainerBuilder $container) {
foreach ($this->passConfig
->getPasses() as $pass) {
$pass
->process($container);
}
}
}
Classes
Name |
Description |
Compiler |
This class is used to remove circular dependencies between individual passes. |