/** * @throws Exception if the key is unkown * @return \model\Product */ public function getSelectedProduct() { assert($this->navigation->customerWantsToSeeProduct()); $unique = $this->navigation->getProductID(); $product = $this->catalog->getProductFromUnique($unique); if ($product != null) { return $product; } throw new \Exception("unknown key"); }