Adds the object class hierarchy as resources.
@api
object $object An object instance:
ContainerBuilder The current instance
public function addObjectResource($object) {
if ($this->trackResources) {
$this
->addClassResource(new \ReflectionClass($object));
}
return $this;
}