本文整理匯總了PHP中HomeController::show方法的典型用法代碼示例。如果您正苦於以下問題:PHP HomeController::show方法的具體用法?PHP HomeController::show怎麽用?PHP HomeController::show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HomeController
的用法示例。
在下文中一共展示了HomeController::show方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: switch
}
//echo "Control: $control <br>";
switch ($control) {
case "results":
MasterView::showHeader();
ResultsController::add();
MasterView::showFooter();
break;
case "viewResults":
MasterView::showHeader();
ResultsController::view();
MasterView::showFooter();
break;
case "writeResults":
MasterView::showHeader();
ResultsController::write();
MasterView::showFooter();
break;
case "HowTo":
MasterView::showHeader();
ResultsController::howto();
MasterView::showFooter();
break;
default:
MasterView::showHeader();
HomeController::show();
MasterView::showFooter();
}
?>
示例2: isset
<?php
namespace App\Controllers;
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
switch ($page) {
case 'home':
$controller = new HomeController();
$controller->show();
break;
case 'personalmessage':
$controller = new ContactController();
$controller->show();
break;
case 'category':
$controller = new RecipesController();
$controller->showitems();
break;
case 'recipes':
$controller = new RecipesController();
$controller->show();
break;
case 'recipe.edit':
$controller = new RecipesController();
$controller->edit();
case 'singlerecipe':
$controller = new RecipesController();
$controller->showIndividualRecipe();
break;
case 'register':
$controller = new AuthenticationController();