本文整理汇总了PHP中Operator::setSizeHarness方法的典型用法代码示例。如果您正苦于以下问题:PHP Operator::setSizeHarness方法的具体用法?PHP Operator::setSizeHarness怎么用?PHP Operator::setSizeHarness使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Operator
的用法示例。
在下文中一共展示了Operator::setSizeHarness方法的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);
}