Esempio n. 1
0
 public function register(MemberForm $memberForm)
 {
     $member = new Model_Members();
     $member->namefull = $memberForm->getNamefull();
     $member->email = $memberForm->getEmail();
     $member->point = $memberForm->getPoint();
     $memberDao = new MembersDao();
     $memberDao->runInsertByAspectBefore();
     return $memberDao->runInsertByAspect($member);
 }
Esempio n. 2
0
 public function action_register()
 {
     $memberForm = new MemberForm();
     $memberForm->excuteAutoBind(Input::all());
     $memberValidation = new MemberValidator();
     $validation = $memberValidation->validate();
     $memberForm->setValiator($validation);
     $memberService = new MemberService();
     if ($validation->run()) {
         $memberService->register($memberForm);
         return Aspect::getViewForge(View::forge('member/register', $memberForm->toView()), $memberForm);
     } else {
         return Aspect::getViewForge(View::forge('member/index', $memberForm->toView()), $memberForm);
     }
 }