当前位置: 首页>>代码示例>>PHP>>正文


PHP UserController::insertUser方法代码示例

本文整理汇总了PHP中UserController::insertUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::insertUser方法的具体用法?PHP UserController::insertUser怎么用?PHP UserController::insertUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserController的用法示例。


在下文中一共展示了UserController::insertUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addRoutes

 static function addRoutes($app, $authenticateForRole)
 {
     //* /user/id - members can get their own profile
     $app->map("/user/get/:userId/", $authenticateForRole('member'), function ($userId) use($app) {
         UserController::selectUser($app, $userId);
     })->via('GET', 'POST');
     /*
      * id, nameFirst, nameLast, email, phone
      */
     $app->post("/user/update/:userId/", $authenticateForRole('member'), function ($userId) use($app) {
         UserController::updateUser($app, $userId);
     });
     //* /user/ routes - admin users only
     $app->group('/user', $authenticateForRole('admin'), function () use($app) {
         /*
          * nameFirst, nameLast, email, password
          */
         $app->post("/insert/", function () use($app) {
             UserController::insertUser($app);
         });
         /*
          * id
          */
         $app->map("/delete/:userId/", function ($userId) use($app) {
             UserController::deleteUser($app, $userId);
         })->via('DELETE', 'POST');
         /*
          * userId, groupId
          */
         $app->post("/unassign-group/", function () use($app) {
             UserController::unassignGroup($app);
         });
         /*
          * userId, groupId
          */
         $app->post("/assign-group/", function () use($app) {
             UserController::assignGroup($app);
         });
     });
 }
开发者ID:rachellcarbone,项目名称:angular-seed,代码行数:40,代码来源:user.routes.php

示例2: Conecta

 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
if (!empty($_GET)) {
    print_r($_GET);
    include "../model/Conecta.php";
    include "../model/dao/userDao/DaoUserRegister.php";
    include "../model/beans/UserRegister.php";
    include "class/UserController.php";
    include "class/UserControllerOfficial.php";
    $conecta = new Conecta();
    $daoUserRegister = new DaoUserRegister();
    $modelUserRegister = new UserRegister();
    $userService = new UserController($_POST, $conecta, $daoUserRegister, $modelUserRegister);
    if ($_GET["action"] == "insert") {
        $userService->processDataForm();
        $userService->insertUser();
        header("Location:../userRegister.php");
    }
    if ($_GET["action"] == "update") {
        print "deveria cair aqui";
    }
    if ($_GET["action"] == "delete") {
        $userService->deleteUser($_GET["id"]);
        header("Location:../cadastrar.php");
    }
    if ($_GET["action"] == "view") {
    }
} else {
    include "model/Conecta.php";
    include "model/dao/userDao/DaoUserRegister.php";
    include "model/beans/UserRegister.php";
开发者ID:saulocamposi,项目名称:cmsImperativo,代码行数:31,代码来源:UserRegisterController.php


注:本文中的UserController::insertUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。