/** * @param string $declaration * * @return string * @throws DeclarationNotFound * @throws \Exception */ public function getClassname($declaration) { if (!$this->injectionConfiguration->has($declaration)) { throw new DeclarationNotFound("Declaration of Class '" . $declaration . "' not found."); } $json = $this->injectionConfiguration->get($declaration); if (!isset($json["class"])) { throw new \Exception("Index 'class' not found in declaration '" . $declaration . "'."); } return $json["class"]; }