public function hasSha($sha) { if ($this->index) { return $this->index->hasSha($sha); } else { throw new \BadMethodCallException("hasSha without index is not implemented yet."); } }