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


PHP UserController::render方法代碼示例

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


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

示例1: run

 static function run()
 {
     $r = new Request();
     $r->parse();
     $controller = $r->controller . 'Controller';
     $action = $r->action;
     if (class_exists($controller)) {
         $obj = new $controller($r);
         $obj->render();
     } else {
         // do default stuff;
         $obj = new UserController(new Request());
         $obj->render();
     }
 }
開發者ID:jyip,項目名稱:myMVC,代碼行數:15,代碼來源:request.php

示例2: UserController

             $serviceController->render();
             break;
     }
     break;
 case "users":
     $userController = new UserController();
     $where = $route[2];
     switch ($where) {
         case 'addNew':
             $userController->addNew();
             break;
         case 'updateRequestStatus':
             $userController->updateUser();
             break;
         default:
             $userController->render();
             break;
     }
     break;
 case "getInTouch":
     $getInTouchController = new GetInTouchController();
     $where = $route[2];
     switch ($where) {
         case 'updateGetInTouchStatus':
             $getInTouchController->updateGetInTouchStatus();
             break;
         default:
             $getInTouchController->render();
             break;
     }
     break;
開發者ID:rajnishp,項目名稱:bjsadmin,代碼行數:31,代碼來源:index.php

示例3: userController_markTroll_create

 /**
  * Validates the current user's permissions & transientkey and then marks a user as a troll.
  *
  * @param UserController $sender
  */
 public function userController_markTroll_create($sender, $userID, $troll = true)
 {
     $sender->permission('Garden.Moderation.Manage');
     $trollUserID = $userID;
     // Validate the transient key && permissions
     // Make sure we are posting back.
     if (!$sender->Request->isAuthenticatedPostBack()) {
         throw PermissionException('Javascript');
     }
     $trolls = self::getTrolls();
     // Toggle troll value in DB
     if (in_array($trollUserID, $trolls)) {
         Gdn::sql()->update('User', ['Troll' => 0], ['UserID' => $trollUserID])->put();
         unset($trolls[array_search($trollUserID, $trolls)]);
     } else {
         Gdn::sql()->update('User', ['Troll' => 1], ['UserID' => $trollUserID])->put();
         $trolls[] = $trollUserID;
     }
     self::setTrolls($trolls);
     $sender->jsonTarget('', '', 'Refresh');
     $sender->render('Blank', 'Utility', 'Dashboard');
 }
開發者ID:vanilla,項目名稱:addons,代碼行數:27,代碼來源:class.trollmanagement.plugin.php

示例4: catch

require ROOT_DIR . '/appli/engine/model/AppModel.php';
require ROOT_DIR . '/appli/engine/model/Manager.php';
// Services
require ROOT_DIR . '/appli/engine/service/Service.php';
require ROOT_DIR . '/appli/engine/service/Container.php';
// Controllers
require ROOT_DIR . '/appli/engine/controller/Controller.php';
require ROOT_DIR . '/appli/engine/controller/AppController.php';
// Classes propres au site
require ROOT_DIR . '/appli/models/User.php';
require ROOT_DIR . '/appli/models/Link.php';
require ROOT_DIR . '/appli/views/ViewHelper.php';
// gestionnaire d'erreurs
include ROOT_DIR . '/appli/engine/ErrorHandler.php';
set_error_handler("ErrorHandler");
try {
    require_once ROOT_DIR . '/appli/controllers/' . $page . '.php';
    $controller = new $page();
    $controller->{$action}();
} catch (Exception $e) {
    Service_Container::getInstance()->get('Mailer')->sendError($e);
    if ($page == 'UserController') {
        include ROOT_DIR . '/appli/views/maintenance.htm';
        die;
    } else {
        require_once ROOT_DIR . '/appli/controllers/UserController.php';
        $controller = new UserController();
        $controller->view->growlerError();
        $controller->render();
    }
}
開發者ID:aricci95,項目名稱:metallink,代碼行數:31,代碼來源:index.php


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