private function showAction() { // no id => redirect home if (!array_key_exists('id', $_GET)) { $this->homeAction(); return; } $iId = intval($_GET['id']); $oCategory = CategoryManager::get($iId); // product not found => redirect home if (null === $oCategory) { $this->homeAction(); return; } else { $aProducts = ProductManager::getAllFromCategory($oCategory); require ROOT . 'src/ecommerce/view/category/show.php'; //} } }