code: public function remove($key)
      {
          if (!$this->repository->containsKey($key))
              throw new ReferenceDoesNotExistException();
          $this->repository->remove($key);
          return $this;
      }
docs: Removes a reference identified by $key
  
  @param $key
  @return $this
  @throws ReferenceDoesNotExistException if no reference exists identified by specified key