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


PHP Student::setEmail方法代码示例

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


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

示例1: executeNew

 public function executeNew(sfWebRequest $request)
 {
     $programSectionId = $request->getParameter('sectionId');
     $this->sectionDetail = Doctrine_Core::getTable('ProgramSection')->findOneById($programSectionId);
     $this->forward404Unless($this->sectionDetail);
     ## New Form
     $this->studentForm = new FrontendStudentForm();
     if ($request->isMethod('POST')) {
         $this->studentForm->bind($request->getParameter('studentform'));
         if ($this->studentForm->isValid()) {
             $formData = $this->studentForm->getValues();
             $student = new Student();
             $name = $formData['name'];
             $fathersName = $formData['fathers_name'];
             $grandfathersName = $formData['grandfathers_name'];
             $motherName = $formData['mother_name'];
             $dateOfBirth = $formData['date_of_birth'];
             $sex = $formData['sex'];
             $nationality = $formData['nationality'];
             $birthLocation = $formData['birth_location'];
             $residenceCity = $formData['residence_city'];
             $residenceWoreda = $formData['residence_woreda'];
             $residenceKebele = $formData['residence_kebele'];
             $residenceHourseNumber = $formData['residence_house_number'];
             $ethnicity = $formData['ethnicity'];
             $telephone = $formData['telephone'];
             $email = $formData['email'];
             $student->setName($name);
             $student->setFathersName($fathersName);
             $student->setGrandfathersName($grandfathersName);
             $student->setMotherName($motherName);
             $student->setDateOfBirth($dateOfBirth);
             $student->setSex($sex);
             $student->setAdmissionYear(date('Y'));
             $student->setNationality($nationality);
             $student->setBirthLocation($birthLocation);
             $student->setResidenceCity($residenceCity);
             $student->setResidenceWoreda($residenceWoreda);
             $student->setResidenceKebele($residenceKebele);
             $student->setResidenceHouseNumber($residenceHourseNumber);
             $student->setEthinicity($ethnicity);
             $student->setTelephone($telephone);
             $student->setEmail($email);
             $student->save();
             $enrollment = new EnrollmentInfo();
             $enrollment->makeEnrollment(null, null, null, null, $programSectionId, sfConfig::get('app_transfer_enrollment'), $student->getId());
             $auditlog = new AuditLog();
             $auditlog->addNewLogInfo($this->getUser()->getAttribute('userId'), 'Performed Enrollment of Transfered Student');
             $this->getUser()->setFlash('notice', 'Transfer Enrollment Was Successful ');
             $this->redirect('transfer/sectiondetail/?id=' . $programSectionId);
         } else {
             $this->getUser()->setFlash('error', 'Error with Transfer Enrollment Form');
         }
     }
 }
开发者ID:eyumay,项目名称:srms.psco,代码行数:55,代码来源:actions.class.php

示例2: validate

 protected function validate()
 {
     $required = array("teacher_id" => "Teacher Id", "admission_date" => "Admission Date", "name" => "Name", "subject_id" => "Subject", "date_of_birth" => "Date of Birth", "gender" => "Gender", "mobile" => "Mobile");
     global $user;
     if ($user->checkAdmin() == true) {
         if (isset($_POST)) {
             foreach ($required as $key => $value) {
                 if (!isset($_POST[$key]) || $_POST[$key] == '' || $_POST[$key] == 'select') {
                     echo $value . ' is Required<br/>';
                     return;
                 }
             }
             if (!is_numeric($_POST['mobile'])) {
                 echo "Mobile number must be Numeric";
             } else {
                 if (isset($_POST['permanent_pincode']) && $_POST['permanent_pincode'] != '' && !is_numeric($_POST['permanent_pincode']) || isset($_POST['correspondence_pincode']) && $_POST['correspondence_pincode'] != '' && !is_numeric($_POST['correspondence_pincode'])) {
                     echo "Pincode must be Numeric";
                 } else {
                     echo 'Saving...';
                     global $objPDO;
                     require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_class.php';
                     require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
                     $teacher = new Student($objPDO);
                     $teacherProfile = new Teacher($objPDO);
                     $temp_pass = substr(md5(microtime()), 5, 10);
                     $pass = md5($temp_pass);
                     $teacher_id = $_POST['teacher_id'];
                     if ($_POST['blood_group'] == 'select') {
                         unset($_POST['blood_group']);
                     }
                     $acct_type = 'teacher';
                     $teacher->setacctType($acct_type);
                     $teacher->loadByRoll($teacher_id);
                     $teacher->setRollNo($teacher_id);
                     $teacher->setPhone($_POST['phone']);
                     $teacher->setName($_POST['name']);
                     $teacher->setEmail($_POST['email']);
                     if ($teacher->getPassword() == '' || $teacher->getPassword() == NULL) {
                         $teacher->setPassword($pass);
                     }
                     $teacher->save();
                     $id = $teacher->getID();
                     $teacherProfile->setByArray($_POST);
                     $teacherProfile->setTempPass($temp_pass);
                     $teacherProfile->setUserId($id);
                     $teacherProfile->save();
                     echo '<meta http-equiv="Refresh" content="0;url=http://localhost/cloud/teacher/confirm/' . $teacherProfile->getUserId() . '"/>';
                 }
             }
         }
     } else {
         header('Location:http://localhost/cloud');
     }
 }
开发者ID:srinivasans,项目名称:educloud,代码行数:54,代码来源:teacherController.php

示例3: City

<?php

require_once '../Hypersistence/Hypersistence.php';
Hypersistence::registerAutoloader();
require_once './Person.php';
require_once './Book.php';
require_once './Student.php';
require_once './Course.php';
require_once './City.php';
//SAVE
$c = new City();
$c->setName('San Francisco');
$c->save();
$s = new Student();
$s->setCity($c);
$s->setEmail('test@hypersistence.com');
$s->setName('Mateus Fornari');
$s->setNumber('123456');
var_dump($s->save());
$course = new Course();
$course->setDescription('PHP Programming');
$course->save();
$s->addCourses($course);
$p = new Person();
$p->setCity($c);
$p->setEmail('other@hypersistence.com');
$p->setName('Other Person');
$p->save();
$b = new Book();
$b->setAuthor($p);
$b->setTitle('PHP Book');
开发者ID:mateusfornari,项目名称:hypersistence-alpha,代码行数:31,代码来源:index.php

示例4: array

<?php

require_once 'student_class.php';
require_once 'pdofactory_class.php';
$strDSN = 'mysql:dbname=cloud;host=localhost';
$objPDO = PDOfactory::GetPDO($strDSN, "root", "", array());
$objPDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$objUser = new Student($objPDO);
$objUser->setRollNo("admin");
$objUser->setName("admin");
$objUser->setEmail("srini2351994@yahoo.com");
$objUser->setPassword("827ccb0eea8a706c4c34a16891f84e7b");
$objUser->setPhone("2346");
$objUser->setacctType("admin");
$objUser->save();
echo $objUser->getName();
echo $objUser->getEmail();
echo $objUser->getPassword();
echo $objUser->getPhone();
//$objUser->markForDeletion();
开发者ID:srinivasans,项目名称:educloud,代码行数:20,代码来源:test.php


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