Adds the object class hierarchy as resources.
@api
object $object An object instance:
public function addObjectResource($object) {
$parent = new \ReflectionObject($object);
do {
$this
->addResource(new FileResource($parent
->getFileName()));
} while ($parent = $parent
->getParentClass());
}