public function ContainerBuilder::addClassResource in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addClassResource()
Adds the given class hierarchy as resources.
Parameters
\ReflectionClass $class:
Return value
ContainerBuilder The current instance
2 calls to ContainerBuilder::addClassResource()
- ContainerBuilder::addObjectResource in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php - Adds the object class hierarchy as resources.
- ContainerBuilder::compile in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php - Compiles the container.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php, line 269
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
public function addClassResource(\ReflectionClass $class) {
if (!$this->trackResources) {
return $this;
}
do {
$this
->addResource(new FileResource($class
->getFileName()));
} while ($class = $class
->getParentClass());
return $this;
}