You are here

public function ContainerBuilder::addObjectResource in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addObjectResource()

Adds the object class hierarchy as resources.

Parameters

object $object An object instance:

Return value

ContainerBuilder The current instance

2 calls to ContainerBuilder::addObjectResource()
ContainerBuilder::addCompilerPass in vendor/symfony/dependency-injection/ContainerBuilder.php
Adds a compiler pass.
ContainerBuilder::compile in vendor/symfony/dependency-injection/ContainerBuilder.php
Compiles the container.

File

vendor/symfony/dependency-injection/ContainerBuilder.php, line 235

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public function addObjectResource($object) {
  if ($this->trackResources) {
    $this
      ->addClassResource(new \ReflectionClass($object));
  }
  return $this;
}