当前位置: 首页>>代码示例>>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;未经允许,请勿转载。