當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HomeController::run方法代碼示例

本文整理匯總了PHP中HomeController::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP HomeController::run方法的具體用法?PHP HomeController::run怎麽用?PHP HomeController::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HomeController的用法示例。


在下文中一共展示了HomeController::run方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: runModule

 private function runModule()
 {
     switch ($this->sModule) {
         case "Home":
             $oController = new HomeController();
             $oController->run($this->sAction, $this->asArgs, $this->sView);
             break;
         case "ShowRoom":
             $oController = new ShowRoomController();
             $oController->run($this->sAction, $this->asArgs, $this->sView);
             break;
         case "Basic":
             $oController = new BasicController();
             $oController->run($this->sAction, $this->asArgs, $this->sView);
             break;
         case "Products":
             $oController = new ProdutosController();
             $oController->run($this->sAction, $this->asArgs, $this->sView);
             break;
         default:
             echo "Erro: Módulo não existe";
     }
     /* switch ( $this->sModule ) */
 }
開發者ID:evandrolacerda,項目名稱:PHP_8860,代碼行數:24,代碼來源:classMasterController.php

示例2: HomeController

        $controller .= "Controller";
        if (class_exists($controller)) {
            $page = new $controller();
            $action = str_replace(chr(0), '', $_GET['action']);
            if (method_exists($page, $action)) {
                $homepage = false;
                $page->run($action);
                $fail = false;
            }
        }
        if ($fail) {
            throw new Error404('Action not found');
        }
    } else {
        // We didn't render an action, let's render the index
        $page = new HomeController();
        $page->run('index');
        //$page = new EventController();
        //$page->run('coverage', 'epic13');
    }
} catch (WebException $e) {
    $e->notify();
    $e->render();
} catch (Exception $e) {
    Email::send_exception_email($e);
    $newError = new Error500('An unexpected error occurred');
    $newError->render();
}
?>

開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:29,代碼來源:index.php


注:本文中的HomeController::run方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。