public function addComponent(IResolvable $component)
 {
     if (!$component->isCollectable()) {
         throw new \LogicException('Trying to collect non-collectable component');
     }
     $this->components[] = $component;
 }
 private function addComponent($id, IResolvable $component)
 {
     if ($component->isCollectable() && isset($this->registry[$id])) {
         $this->addCollectable($id, $component);
     }
     $this->registry[$id] = $component;
 }