get) { switch ($this->get['controller']) { case 'user': $userController = new User(); switch ($this->get['action']) { case 'login': return $userController->login(); case 'logout': return $userController->logout(); case 'register': return $userController->register(); } case 'product': $productController = new Product($this->core); switch ($this->get['action']) { case 'list': return $productController->list(); case 'color': return $productController->colorFilter($this->get['color']); } case 'order': $orderController = new Order($this->core); switch ($this->get['action']){ case 'store': return $orderController->store(); case 'basket': return $orderController->basket(); case 'payment': return $orderController->selectPaymentMethod(); case 'add-product': return $orderController->addProduct(); } } } else { $standartController = new Standart($this->core); return $standartController->homepage(); } throw new \Exception('Route not found!'); } public function setGet(array $get): void { $this->get = $get; } public function setCore(CoreInterface $core): void { $this->core = $core; } }