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


PHP Operator::setEmail方法代碼示例

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


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

示例1: createAction

 public function createAction()
 {
     $this->isAdmin();
     if (isset($_POST['operator'])) {
         $O_operator = new Operator();
         $O_operator->setName($_POST['name']);
         $O_operator->setFirstName($_POST['firstName']);
         $O_operator->setSizeHarness($_POST['sizeHarness']);
         $O_operator->setEmail($_POST['email']);
         $O_operator->initInceptionDate();
         $O_teamMapper = new TeamMapper();
         $O_team = $O_teamMapper->findByTwoIds($_POST['staff_id'], $_POST['subgroup_id']);
         $O_operator->setTeamId($O_team->getId());
         $O_operatorMapper = new OperatorMapper();
         $I_operatorId = $O_operatorMapper->insert($O_operator);
         //die(header('Location:/user/default/'));
     }
     if (isset($_POST['inspector'])) {
         $O_inspector = new Inspector();
         $O_inspector->setName($_POST['name']);
         $O_inspector->setFirstName($_POST['firstName']);
         $O_inspector->setEmail($_POST['email']);
         $O_inspector->setSubgroupId($_POST['subgroup_id']);
         $O_inspector->initInceptionDate();
         $O_inspectorMapper = new InspectorMapper();
         $I_inspectorId = $O_inspectorMapper->insert($O_inspector);
     }
     $O_user = new User();
     $O_user->setLogin($_POST['login']);
     $O_user->setPassword($_POST['password']);
     $O_user->setProfileId($_POST['profile_id']);
     if (isset($_POST['operator'])) {
         $O_user->setOperatorId($I_operatorId);
     }
     if (isset($_POST['inspector'])) {
         $O_user->setInspectorId($I_inspectorId);
     }
     $O_userMapper = new UserMapper();
     $I_userId = $O_userMapper->insert($O_user);
 }
開發者ID:Vincent-Troccaz,項目名稱:safety,代碼行數:40,代碼來源:ControllerUser.php


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