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


PHP Person::setEmail方法代码示例

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


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

示例1: fromXML

 /**
  * @param SimpleXMLElement $xml
  * @return Person
  * @throws InvalidGPXException
  */
 public static function fromXML(SimpleXMLElement $xml)
 {
     $person = new Person();
     if (!empty($xml->name)) {
         $person->setName((string) $xml->name[0]);
     }
     if (!empty($xml->email)) {
         $person->setEmail(Email::fromXML($xml->email[0]));
     }
     if (!empty($xml->link)) {
         $person->setLink(Link::fromXML($xml->link[0]));
     }
     return $person;
 }
开发者ID:Crayg,项目名称:PHPGPX,代码行数:19,代码来源:Person.php

示例2: save_register

 public function save_register()
 {
     $newPerson = new Person();
     $toRepository = new Administration();
     $newPerson->setTitle(Input::get('userTitle'));
     $newPerson->setName(Input::get('txtName'));
     $newPerson->setSurname(Input::get('txtSurName'));
     $newPerson->setPosition_ID(Input::get('userPosition'));
     $newPerson->setBirthday(Input::get('txtBirthday'));
     $newPerson->setNational_ID(Input::get('txtIdent'));
     $newPerson->setType_ID(Input::get('userType'));
     $newPerson->setDepartment_ID(Input::get('userDepart'));
     $newPerson->setDivision_ID(Input::get('userDivision'));
     $newPerson->setEmail(Input::get('txtEmail'));
     $newPerson->setTelphone(Input::get('txtTel'));
     $returnValue = $toRepository->addPerson($newPerson);
     if ($returnValue == 1) {
         return View::make('alert/person/alertRegister');
     } else {
         return View::make('alert/person/alertRegister2');
     }
 }
开发者ID:pmonkeyshoot,项目名称:special-robot,代码行数:22,代码来源:PersonController.php

示例3: Main


//.........这里部分代码省略.........
             }
             $ImprovementsBuildingsEncode = new SoapObject(NCCBIZ . "ImprovementsBuildingsEncode.php", "urn:Object");
             if ($this->formArray["propertyID"] != "") {
                 $ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
                 if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($this->formArray["propertyID"]))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "record not found");
                 } else {
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                         $this->tpl->set_var("TableBlock", "error xmlDoc");
                     } else {
                         $address = new Address();
                         $address->setAddressID($this->formArray["addressID"]);
                         $address->setNumber($this->formArray["number"]);
                         $address->setStreet($this->formArray["street"]);
                         $address->setBarangay($this->formArray["barangay"]);
                         $address->setDistrict($this->formArray["district"]);
                         $address->setMunicipalityCity($this->formArray["municipalityCity"]);
                         $address->setProvince($this->formArray["province"]);
                         $address->setDomDocument();
                         $propertyAdministrator = new Person();
                         $propertyAdministrator->setPersonID($this->formArray["personID"]);
                         $propertyAdministrator->setLastName($this->formArray["lastName"]);
                         $propertyAdministrator->setFirstName($this->formArray["firstName"]);
                         $propertyAdministrator->setMiddleName($this->formArray["middleName"]);
                         //$propertyAdministrator->setGender($this->formArray["gender"]);
                         //$propertyAdministrator->setBirthday($this->birthdate);
                         //$propertyAdministrator->setMaritalStatus($this->formArray["maritalStatus"]);
                         //$propertyAdministrator->setTin($this->formArray["tin"]);
                         $propertyAdministrator->setAddressArray($address);
                         $propertyAdministrator->setTelephone($this->formArray["telephone"]);
                         //$propertyAdministrator->setMobileNumber($this->formArray["mobileNumber"]);
                         $propertyAdministrator->setEmail($this->formArray["email"]);
                         $propertyAdministrator->setDomDocument();
                         $improvementsBuildings = new ImprovementsBuildings();
                         $improvementsBuildings->parseDomDocument($domDoc);
                         $improvementsBuildings->setPropertyID($this->formArray["propertyID"]);
                         $improvementsBuildings->setAfsID($this->formArray["afsID"]);
                         $improvementsBuildings->setArpNumber($this->formArray["arpNumber"]);
                         $improvementsBuildings->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
                         $improvementsBuildings->setPropertyAdministrator($propertyAdministrator);
                         $improvementsBuildings->setVerifiedBy($this->formArray["verifiedByID"]);
                         $improvementsBuildings->setPlottingsBy($this->formArray["plottingsByID"]);
                         $improvementsBuildings->setNotedBy($this->formArray["notedByID"]);
                         $improvementsBuildings->setMarketValue($this->formArray["marketValue"]);
                         $improvementsBuildings->setKind($this->formArray["kind"]);
                         $improvementsBuildings->setActualUse($this->formArray["actualUse"]);
                         $improvementsBuildings->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]);
                         $improvementsBuildings->setAssessmentLevel($this->formArray["assessmentLevel"]);
                         $improvementsBuildings->setAssessedValue($this->formArray["assessedValue"]);
                         $improvementsBuildings->setPreviousOwner($this->formArray["previousOwner"]);
                         $improvementsBuildings->setPreviousAssessedValue($this->formArray["previousAssessedValue"]);
                         $improvementsBuildings->setTaxability($this->formArray["taxability"]);
                         $improvementsBuildings->setEffectivity($this->formArray["effectivity"]);
                         $improvementsBuildings->setAppraisedBy($this->formArray["appraisedByID"]);
                         $improvementsBuildings->setAppraisedByDate($this->formArray["appraisedByDate"]);
                         $improvementsBuildings->setRecommendingApproval($this->formArray["recommendingApprovalID"]);
                         $improvementsBuildings->setRecommendingApprovalDate($this->formArray["recommendingApprovalDate"]);
                         $improvementsBuildings->setApprovedBy($this->formArray["approvedByID"]);
                         $improvementsBuildings->setApprovedByDate($this->formArray["approvedByDate"]);
                         $improvementsBuildings->setMemoranda($this->formArray["memoranda"]);
                         $improvementsBuildings->setPostingDate($this->formArray["postingDate"]);
                         $improvementsBuildings->setLandPin($this->formArray["landPin"]);
                         $improvementsBuildings->setFoundation($this->formArray["foundation"]);
                         $improvementsBuildings->setColumnsBldg($this->formArray["columnsBldg"]);
开发者ID:armic,项目名称:erpts,代码行数:67,代码来源:ImprovementsBuildingsEncode.php

示例4: executeConfirmStudent


//.........这里部分代码省略.........
                     $student->getPerson()->setBirthDepartment($city->getDepartment()->getId());
                 }
                 //chequeo domicilio
                 if (!is_null($s_city) || !is_null($s_street) || !is_null($s_number) || !is_null($s_floor) || is_null($s_flat)) {
                     $a = new Address();
                     $a->setCityId($s_city);
                     $a->setStreet($s_street);
                     $a->setNumber($s_number);
                     $a->setFloor($s_floor);
                     $a->setFlat($s_flat);
                     $student->getPerson()->setAddress($a);
                     $student->getPerson()->save(Propel::getConnection());
                     $data['message'] = "El alumno ha sido confirmado.";
                 }
             } else {
                 //seteo isActive
                 $student->getPerson()->setIsActive(true);
                 $student->save(Propel::getConnection());
                 $data['message'] = "El alumno fue actualizado correctamente.";
             }
             //chequeo campos obligatorios
             if (!is_null($m_identification_type) && !is_null($m_identification_number) && !is_null($m_lastname) && trim($m_lastname) != "" && !is_null($m_firstname) && trim($m_firstname) != "") {
                 //busco si ya existe.
                 $m_tutor = TutorPeer::findByDocumentTypeAndNumber($m_identification_type, $m_identification_number);
                 if (is_null($m_tutor)) {
                     //el tutor no existe. Lo creo
                     $m_person = new Person();
                     $m_person->setLastname($m_lastname);
                     $m_person->setFirstname($m_firstname);
                     $m_person->setIdentificationType($m_identification_type);
                     $m_person->setIdentificationNumber($m_identification_number);
                     $m_person->setSex(SexType::FEMALE);
                     $m_person->setPhone($m_phone);
                     $m_person->setEmail($m_email);
                     $m_person->setBirthdate($m_birthdate);
                     $m_person->setIsActive(true);
                     $m_person->setBirthCity($m_birth_city);
                     $m_person->save(Propel::getConnection());
                     $m_tutor = new Tutor();
                     $m_tutor->setPerson($m_person);
                     $m_tutor->setOccupationId($m_occupation);
                     $m_tutor->setOccupationCategoryId($m_occupation_category);
                     $m_tutor->setStudyId($m_study);
                     //coincide con la tabla sga_tipos_est_cur
                     $m_tutor->setNationality($m_nationality);
                     $m_tutor->setIsAlive($m_is_alive);
                     $m_tutor->save(Propel::getConnection());
                     /* Recupero department, state ,country*/
                     if (!is_null($m_birth_city)) {
                         $m_city = CityPeer::retrieveByPk($m_birth_city);
                         $m_tutor->getPerson()->setBirthCountry($m_city->getDepartment()->getState()->getCountry()->getId());
                         $m_tutor->getPerson()->setBirthState($m_city->getDepartment()->getState()->getId());
                         $m_tutor->getPerson()->setBirthDepartment($m_city->getDepartment()->getId());
                     }
                     //chequeo domicilio
                     if (!is_null($m_city) || !is_null($m_street) || !is_null($m_number) || !is_null($m_floor) || is_null($m_flat)) {
                         $a = new Address();
                         $a->setCityId($m_birth_city);
                         $a->setStreet($m_street);
                         $a->setNumber($m_number);
                         $a->setFloor($m_floor);
                         $a->setFlat($m_flat);
                         $m_tutor->getPerson()->setAddress($a);
                         $m_tutor->getPerson()->save(Propel::getConnection());
                     }
                 } else {
开发者ID:nvidela,项目名称:kimkelen,代码行数:67,代码来源:actions.class.php

示例5: Person

     $zip = array_key_exists("zip", $_REQUEST) ? $_REQUEST["zip"] : "";
     $country = array_key_exists("country", $_REQUEST) ? $_REQUEST["country"] : "";
     $url = array_key_exists("url", $_REQUEST) ? $_REQUEST["url"] : "";
     $biography = array_key_exists("biography", $_REQUEST) ? $_REQUEST["biography"] : "";
     $isPublic = array_key_exists("ispublic", $_REQUEST) ? $_REQUEST["ispublic"] : "";
     $newPerson = new Person();
     $newPerson->setUid($userId);
     $newPerson->setFirstName($firstname);
     $newPerson->setLastName($lastname);
     $newPerson->setTitle($title);
     $newPerson->setInstitution($institution);
     $newPerson->setCity($city);
     $newPerson->setState($state);
     $newPerson->setZip($zip);
     $newPerson->setCountry($country);
     $newPerson->setEmail($email);
     $newPerson->setUrl($url);
     $newPerson->setBiography($biography);
     $newPerson->setIsPublic($isPublic);
     if (!$pHandler->updateProfile($newPerson)) {
         $statusStr = "Profile update failed!";
     }
     $person = $pHandler->getPerson();
     if ($person->getIsTaxonomyEditor()) {
         $tabIndex = 3;
     } else {
         $tabIndex = 2;
     }
 } elseif ($action == "Change Password") {
     $newPwd = $_REQUEST["newpwd"];
     $updateStatus = false;
开发者ID:Symbiota,项目名称:Symbiota,代码行数:31,代码来源:viewprofile.php

示例6: getPersons

 public static function getPersons()
 {
     $dados = Database::ReadAll("person", "*");
     if (!$dados) {
         return '';
     }
     foreach ($dados as $dado) {
         $person = new Person();
         $person->setId($dado['ID_PERSON']);
         $person->setName($dado['NAME_PERSON']);
         $person->setEmail($dado['EMAIL']);
         $person->setAge($dado['AGE']);
         $person->setSex($dado['SEX']);
         $person->setPhone($dado['PHONE']);
         $person->setOperator($dado['OPERATOR']);
         $person->setMaritalStatus($dado['MARITAL_STATUS']);
         $person->setChildren($dado['CHILDREN']);
         $religion = Religion::getReligion("WHERE id_religion = " . $dado['ID_RELIGION']);
         $person->setReligion($religion);
         $address = Address::getAddress("AND id_address = " . $dado['ID_ADDRESS']);
         $person->setAddress($address);
         $login = Login::getLogin($dado['ID_PERSON']);
         $person->setLogin($login);
         $persons[] = $person;
     }
     return $persons;
 }
开发者ID:CarolinePaixao,项目名称:SCI,代码行数:27,代码来源:Person.php

示例7: Person

$address1->setNumber("unit 2415 Megaplaza Building");
$address1->setStreet("ADB Avenue corner Garnett Street");
$address1->setBarangay("Barangay San Antonio");
$address1->setDistrict("Ortigas Center");
$address1->setMunicipalityCity("Pasig City");
$address1->setProvince("Metro Manila");
$address1->setDomDocument();
$person = new Person();
//$person->setPersonID(126);
$person->setFirstName("Nelson Juan");
$person->setMiddleName("Miranda");
$person->setLastName(date("H:i:s"));
$person->setGender("male");
$person->setBirthday("1977/07/09");
$person->setMaritalStatus("single");
$person->setTin("1234567890");
$person->setTelephone("026584746");
$person->setMobileNumber("09175302791");
$person->setEmail("nelson@k2ia.com");
$person->setAddressArray($address);
$person->setAddressArray($address1);
$person->setDomDocument();
$domDoc = $person->getDomDocument();
$xmlStr = $domDoc->dump_mem(true);
$obj = new PersonEncode();
//echo "hello<br>";
echo $xmlStr;
//echo $obj->updatePerson($xmlStr);
echo $obj->savePerson($xmlStr);
//echo  $obj->getPersonDetails(1);
//*/
开发者ID:armic,项目名称:erpts,代码行数:31,代码来源:testparse.php

示例8: register

 public function register($postArr)
 {
     $status = false;
     $firstName = $postArr['firstname'];
     $lastName = $postArr['lastname'];
     if ($postArr['institution'] && !trim(strpos($postArr['institution'], ' ')) && preg_match('/[a-z]+[A-Z]+[a-z]+[A-Z]+/', $postArr['institution'])) {
         if ($postArr['title'] && !trim(strpos($postArr['title'], ' ')) && preg_match('/[a-z]+[A-Z]+[a-z]+[A-Z]+/', $postArr['title'])) {
             return false;
         }
     }
     $person = new Person();
     $person->setPassword($postArr['pwd']);
     $person->setUserName($this->userName);
     $person->setFirstName($firstName);
     $person->setLastName($lastName);
     $person->setTitle($postArr['title']);
     $person->setInstitution($postArr['institution']);
     $person->setCity($postArr['city']);
     $person->setState($postArr['state']);
     $person->setZip($postArr['zip']);
     $person->setCountry($postArr['country']);
     $person->setEmail($postArr['emailaddr']);
     $person->setUrl($postArr['url']);
     $person->setBiography($postArr['biography']);
     $person->setIsPublic(isset($postArr['ispublic']) ? 1 : 0);
     //Add to users table
     $fields = 'INSERT INTO users (';
     $values = 'VALUES (';
     $fields .= 'firstname ';
     $values .= '"' . $this->cleanInStr($person->getFirstName()) . '"';
     $fields .= ', lastname';
     $values .= ', "' . $this->cleanInStr($person->getLastName()) . '"';
     if ($person->getTitle()) {
         $fields .= ', title';
         $values .= ', "' . $this->cleanInStr($person->getTitle()) . '"';
     }
     if ($person->getInstitution()) {
         $fields .= ', institution';
         $values .= ', "' . $this->cleanInStr($person->getInstitution()) . '"';
     }
     if ($person->getDepartment()) {
         $fields .= ', department';
         $values .= ', "' . $this->cleanInStr($person->getDepartment()) . '"';
     }
     if ($person->getAddress()) {
         $fields .= ', address';
         $values .= ', "' . $this->cleanInStr($person->getAddress()) . '"';
     }
     if ($person->getCity()) {
         $fields .= ', city';
         $values .= ', "' . $this->cleanInStr($person->getCity()) . '"';
     }
     $fields .= ', state';
     $values .= ', "' . $this->cleanInStr($person->getState()) . '"';
     $fields .= ', country';
     $values .= ', "' . $this->cleanInStr($person->getCountry()) . '"';
     if ($person->getZip()) {
         $fields .= ', zip';
         $values .= ', "' . $this->cleanInStr($person->getZip()) . '"';
     }
     if ($person->getPhone()) {
         $fields .= ', phone';
         $values .= ', "' . $this->cleanInStr($person->getPhone()) . '"';
     }
     if ($person->getEmail()) {
         $fields .= ', email';
         $values .= ', "' . $this->cleanInStr($person->getEmail()) . '"';
     }
     if ($person->getUrl()) {
         $fields .= ', url';
         $values .= ', "' . $person->getUrl() . '"';
     }
     if ($person->getBiography()) {
         $fields .= ', biography';
         $values .= ', "' . $this->cleanInStr($person->getBiography()) . '"';
     }
     if ($person->getIsPublic()) {
         $fields .= ', ispublic';
         $values .= ', ' . $person->getIsPublic();
     }
     $sql = $fields . ') ' . $values . ')';
     //echo "SQL: ".$sql;
     $editCon = $this->getConnection('write');
     if ($editCon->query($sql)) {
         $person->setUid($editCon->insert_id);
         $this->uid = $person->getUid();
         //Add userlogin
         $sql = 'INSERT INTO userlogin (uid, username, password) ' . 'VALUES (' . $person->getUid() . ', "' . $this->cleanInStr($person->getUserName()) . '", PASSWORD("' . $this->cleanInStr($person->getPassword()) . '"))';
         if ($editCon->query($sql)) {
             $status = true;
             //authenicate
             $this->userName = $person->getUserName();
             $this->displayName = $person->getFirstName();
             $this->reset();
             $this->setCookies();
         } else {
             $this->errorStr = 'FAILED: Unable to create user.<div style="margin-left:55px;">Please contact system administrator for assistance.</div>';
         }
     }
     $editCon->close();
//.........这里部分代码省略.........
开发者ID:jphilip124,项目名称:Symbiota,代码行数:101,代码来源:ProfileManager.php

示例9: executeStepSave

 public function executeStepSave(sfWebRequest $request)
 {
     $passenger_session_step5 = $this->getUser()->getAttribute('passangers_step5');
     if (!$passenger_session_step5) {
         return $this->forward('passanger', 'step5_4');
     }
     //save Person data
     $person = new Person();
     $person->setTitle($passenger_session_step5['title']);
     $person->setFirstName($passenger_session_step5['firstname']);
     $person->setLastName($passenger_session_step5['lastname']);
     $person->setAddress1($passenger_session_step5['address1']);
     $person->setAddress2($passenger_session_step5['address2']);
     $person->setCity($passenger_session_step5['city']);
     $person->setCounty($passenger_session_step5['county']);
     $person->setState($passenger_session_step5['state']);
     $person->setCountry($passenger_session_step5['country']);
     $person->setZipcode($passenger_session_step5['zipcode']);
     $person->setDayPhone($passenger_session_step5['day_phone']);
     $person->setDayComment($passenger_session_step5['day_comment']);
     $person->setEveningPhone($passenger_session_step5['eve_phone']);
     $person->setEveningComment($passenger_session_step5['eve_comment']);
     $person->setMobilePhone($passenger_session_step5['mobile_phone']);
     $person->setMobileComment($passenger_session_step5['mobile_comment']);
     $person->setPagerPhone($passenger_session_step5['pager_phone']);
     $person->setPagerComment($passenger_session_step5['pager_comment']);
     $person->setOtherPhone($passenger_session_step5['other_comment']);
     $person->setOtherComment($passenger_session_step5['other_comment']);
     $person->setFaxPhone1($passenger_session_step5['fax_phone1']);
     $person->setFaxComment1($passenger_session_step5['fax_comment1']);
     $person->setAutoFax($passenger_session_step5['auto_fax']);
     $person->setFaxPhone2($passenger_session_step5['fax_phone2']);
     $person->setFaxComment2($passenger_session_step5['fax_comment2']);
     $person->setEmail($passenger_session_step5['email']);
     $person->setEmailTextOnly($passenger_session_step5['textonly']);
     $person->setEmailBlocked($passenger_session_step5['emailblocked']);
     $person->setComment($passenger_session_step5['comment']);
     $person->setBlockMailings($passenger_session_step5['blockmailings']);
     $person->setNewsletter($passenger_session_step5['newsletter']);
     $person->setGender($passenger_session_step5['gender']);
     $person->setDeceased($passenger_session_step5['deceased']);
     $person->setDeceasedComment($passenger_session_step5['deceased_comment']);
     $person->setSecondaryEmail($passenger_session_step5['secemail']);
     $person->setDeceasedDate($passenger_session_step5['deceased_date']);
     $person->setMiddleName($passenger_session_step5['middlename']);
     $person->setSuffix($passenger_session_step5['suffix']);
     $person->setNickname($passenger_session_step5['nickname']);
     $person->setVeteran($passenger_session_step5['military']);
     $person->save();
     //save Passenger data
     $passenger = new Passenger();
     $passenger->setPersonId($person->getId());
     if ($passenger_session_step5['passenger_type_id'] == 0) {
         $passenger->setPassengerTypeId(null);
     } else {
         $passenger->setPassengerTypeId($passenger_session_step5['passenger_type_id']);
     }
     $passenger->setParent($passenger_session_step5['parent']);
     $passenger->setDateOfBirth($passenger_session_step5['date_of_birth']);
     $passenger->setWeight($passenger_session_step5['weight']);
     $passenger->setIllness($passenger_session_step5['illness']);
     $passenger->setPassengerIllnessCategoryId($passenger_session_step5['passenger_illness_category_id']);
     $passenger->setLanguageSpoken($passenger_session_step5['language_spoken']);
     $passenger->setBestContactMethod($passenger_session_step5['best_contact_method']);
     $passenger->setFinancial($passenger_session_step5['facility_name']);
     $passenger->setPublicConsiderations($passenger_session_step5['public_considerations']);
     $passenger->setPrivateConsiderations($passenger_session_step5['private_considerations']);
     $passenger->setGroundTransportationComment($passenger_session_step5['ground_transportation_comment']);
     $passenger->setTravelHistoryNotes($passenger_session_step5['travel_history_notes']);
     $passenger->setReleasingPhysician($passenger_session_step5['releasing_physician']);
     $passenger->setReleasingPhone($passenger_session_step5['releasing_phone']);
     $passenger->setReleasingFax1($passenger_session_step5['releasing_fax1']);
     $passenger->setReleasingFax1Comment($passenger_session_step5['releasing_fax1_comment']);
     $passenger->setReleasingEmail($passenger_session_step5['releasing_email']);
     $passenger->setNeedMedicalRelease($passenger_session_step5['need_medical_release']);
     $passenger->setMedicalReleaseRequested($passenger_session_step5['medical_release_requested']);
     $passenger->setMedicalReleaseReceived($passenger_session_step5['medical_release_received']);
     $passenger->setTreatingPhysician($passenger_session_step5['treating_physician']);
     $passenger->setTreatingPhone($passenger_session_step5['treating_phone']);
     $passenger->setTreatingFax1($passenger_session_step5['treating_fax1']);
     $passenger->setTreatingFax1Comment($passenger_session_step5['treating_fax1_comment']);
     $passenger->setTreatingEmail($passenger_session_step5['treating_email']);
     $passenger->setLanguageSpoken($passenger_session_step5['language_spoken']);
     $passenger->setLodgingPhone($passenger_session_step5['lodging_phone']);
     $passenger->setLodgingPhoneComment($passenger_session_step5['lodging_phone_comment']);
     $passenger->setFacilityName($passenger_session_step5['facility_name']);
     $passenger->setFacilityPhone($passenger_session_step5['facility_phone']);
     $passenger->setFacilityPhoneComment($passenger_session_step5['facility_phone_comment']);
     $passenger->setEmergencyContactName($passenger_session_step5['emergency_contact_name']);
     $passenger->setEmergencyContactPrimaryPhone($passenger_session_step5['emergency_contact_primary_phone']);
     $passenger->setEmergencyContactPrimaryComment($passenger_session_step5['emergency_contact_primary_comment']);
     $passenger->setEmergencyContactSecondaryPhone($passenger_session_step5['emergency_contact_secondary_phone']);
     $passenger->setEmergencyContactSecondaryComment($passenger_session_step5['emergency_contact_secondary_comment']);
     $passenger->save();
     $key = $passenger_session_step5['key'];
     $this->getUser()->setFlash('success', 'Passenger information has been successfully created!');
     $this->redirect('@passenger');
     //removing used session like passenger data
     unset($passenger_session_step5p[$key]);
     $this->getUser()->setAttribute('passanger_step5', $passenger_session_step5);
//.........这里部分代码省略.........
开发者ID:yasirgit,项目名称:afids,代码行数:101,代码来源:actions.class.php

示例10: PDO

/**
 * @copyright 2011 City of Bloomington, Indiana
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
 * @author Cliff Ingham <inghamn@bloomington.in.gov>
 */
include '../../../configuration.inc';
include './migrationConfig.inc';
$pdo = new PDO(MIGRATION_DSN, MIGRATION_USER, MIGRATION_PASS);
$sql = "select distinct\r\n\t\tfirstname,lastname,email,phone,address,city,state,zip\t\t\r\n\t\tfrom contacts";
$result = $pdo->query($sql);
foreach ($result->fetchAll(PDO::FETCH_ASSOC) as $row) {
    $person = new Person();
    $person->setFirstname(ucwords(strtolower($row['firstname'])));
    $person->setPhone($row['phone']);
    $person->setLastname(ucwords(strtolower($row['lastname'])));
    $person->setEmail($row['email']);
    if ($row['address'] && strtolower($row['city']) == 'bloomington') {
        $row['address'] = preg_replace('/[^a-zA-Z0-9\\-\\&\\s\'\\/]/', '', $row['address']);
        $url = new URL(ADDRESS_SERVICE . '/addresses/parse.php');
        $url->format = 'xml';
        $url->address = $row['address'];
        $parsed = new SimpleXMLElement($url, null, true);
        if ($parsed->street_number && $parsed->street_name) {
            // Look up their address in Master Address
            $url = new URL(ADDRESS_SERVICE . '/home.php');
            $url->queryType = 'address';
            $url->format = 'xml';
            $url->query = $row['address'];
            echo $url->query . " ==> ";
            $xml = new SimpleXMLElement($url, null, true);
            if (count($xml) == 1) {
开发者ID:CodeForEindhoven,项目名称:uReport,代码行数:31,代码来源:1_constituents.php

示例11: City

$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');
$b->save();
Hypersistence::commit();
//LOAD
$p = new Person();
$p->setId(1);
$p->load();
echo $p->getName() . "\n";
$books = $p->getBooks()->execute();
foreach ($books as $b) {
    echo $b->getTitle() . "\n";
开发者ID:mateusfornari,项目名称:hypersistence-alpha,代码行数:31,代码来源:index.php

示例12: Person

 $history->setActionDate($row['insp_date']);
 $history->setNotes("{$row['action_taken']}\n{$row['next_action']}");
 if ($row['username']) {
     try {
         $person = new Person($row['username']);
         $history->setEnteredByPerson($person);
         $history->setActionPerson($person);
     } catch (Exception $e) {
         $person = new Person();
         $person->setUsername($row['username']);
         $person->setAuthenticationMethod('LDAP');
         try {
             $ldap = new LDAPEntry($person->getUsername());
             $person->setFirstname($ldap->getFirstname());
             $person->setLastname($ldap->getLastname());
             $person->setEmail($ldap->getEmail());
             $person->save();
         } catch (Exception $e) {
             $person = new Person();
             $person->setFirstname(strtolower($row['username']));
             $person->save();
         }
         $history->setEnteredByPerson($person);
         $history->setActionPerson($person);
     }
 } elseif ($row['needed'] || $row['existing']) {
     $name = $row['needed'] ? $row['needed'] : $row['existing'];
     list($firstname, $lastname) = explode(' ', $name);
     $list = new PersonList(array('firstname' => ucwords(strtolower($firstname)), 'lastname' => ucwords(strtolower($lastname))));
     if (count($list)) {
         $list->next();
开发者ID:CodeForEindhoven,项目名称:uReport,代码行数:31,代码来源:6_tickets.php

示例13: die

                $peopleInfoXML = file_get_contents($baseURL . $searchURL, false, $context) or die("The mospace server might failed\n");
                //echo $baseURL.$searchURL;
                $peopleInfoXMLObject = simplexml_load_string($peopleInfoXML, null, LIBXML_NOCDATA);
                if ($peopleInfoXMLObject['found'] == 0 || $peopleInfoXMLObject['found'] >= 49) {
                    continue;
                }
                //echo "<pre>";
                ///print_r($peopleInfoXMLObject->Person);
                //echo "</pre>";
                $personObject = new Person();
                $personObject->setLastName($parser->getLast());
                $personObject->setFirstName($parser->getFirst());
                //For test purpose only
                //echo $personObject->getLastName().", ".$personObject->getFirstName().";   ";
                $personObject->setDepartment($peopleInfoXMLObject->Person->Department);
                $personObject->setTitle($peopleInfoXMLObject->Person->Title);
                //$personObject->setImageURL("http://freelanceme.net/Images/default%20profile%20picture.png");
                if ($peopleInfoXMLObject->Person->Phone != null) {
                    $personObject->setPhone($peopleInfoXMLObject->Person->Phone);
                }
                $personObject->setEmail($peopleInfoXMLObject->Person->{'E-mail'});
                $personObject->insertToDatabase();
            }
            echo "\n";
            //For testing purpose only
            //if($i++ > 10){
            //break;
            //}
        }
    }
}
开发者ID:brightskylee,项目名称:muresearch,代码行数:31,代码来源:PeopleInfoBuilder.php

示例14: executeSave

 /**
  * missionRequests save all data into corresponding tables
  * CODE:mission_request_create
  */
 public function executeSave(sfWebRequest $request)
 {
     # security
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Coordinator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $miss_req_session = $this->getUser()->getAttribute('miss_req');
     if (!$miss_req_session) {
         return $this->forward('passenger', 'step3');
     }
     //set Requester Person
     $req_person = new Person();
     $req_person->setFirstName($miss_req_session->getReqFirstname());
     $req_person->setLastName($miss_req_session->getReqLastname());
     $req_person->setAddress1($miss_req_session->getReqAddress1());
     $req_person->setAddress2($miss_req_session->getReqAddress2());
     $req_person->setCity($miss_req_session->getReqCity());
     $req_person->setCounty($miss_req_session->getReqCounty());
     $req_person->setState($miss_req_session->getReqState());
     $req_person->setCountry($miss_req_session->getReqCountry());
     $req_person->setZipcode($miss_req_session->getReqZipcode());
     $req_person->setEmail($miss_req_session->getReqEmail());
     $req_person->setSecondaryEmail($miss_req_session->getReqSecondaryEmail());
     $req_person->setPagerEmail($miss_req_session->getReqPagerEmail());
     $req_person->setDayPhone($miss_req_session->getReqDayPhone());
     $req_person->setDayComment($miss_req_session->getReqDayComment());
     $req_person->setEveningPhone($miss_req_session->getReqEvePhone());
     $req_person->setEveningComment($miss_req_session->getReqEveComment());
     $req_person->setMobilePhone($miss_req_session->getReqMobilePhone());
     $req_person->setMobileComment($miss_req_session->getReqMobileComment());
     $req_person->setPagerPhone($miss_req_session->getReqPagerPhone());
     $req_person->setPagerComment($miss_req_session->getReqPagerComment());
     $req_person->setOtherPhone($miss_req_session->getReqOtherPhone());
     $req_person->setOtherComment($miss_req_session->getReqOtherComment());
     $req_person->save();
     //end of Requester Person
     // set Requester Agency
     $agency = AgencyPeer::getByNamePhone(trim($miss_req_session->getAgencyName()));
     if ($agency) {
         # nothing
     } else {
         $agency = new Agency();
         $agency->setName(trim($miss_req_session->getAgencyName()));
         $agency->save();
     }
     //set Requester
     $requester = new Requester();
     $requester->setPersonId($req_person->getId());
     $requester->setAgencyId($agency->getId());
     //$requester->setDischarge($miss_req_session->getReqDischarge());
     $requester->save();
     if (isset($miss_req_session->passenger_id)) {
         $passenger = PassengerPeer::retrieveByPK($miss_req_session->passenger_id);
         if (!$passenger instanceof Passenger) {
             $passenger = new Passenger();
         }
     } else {
         $passenger = new Passenger();
     }
     if ($passenger->isNew()) {
         $person = new Person();
     } else {
         $person = $passenger->getPerson();
     }
     //set Person to Passenger
     $person->setTitle($miss_req_session->getPassTitle());
     $person->setFirstName($miss_req_session->getPassFirstName());
     $person->setLastName($miss_req_session->getPassLastName());
     $person->setGender($miss_req_session->getPassGender());
     $person->setAddress1($miss_req_session->getPassAddress1());
     $person->setAddress2($miss_req_session->getPassAddress2());
     $person->setCity($miss_req_session->getPassCity());
     $person->setState($miss_req_session->getPassState());
     $person->setZipcode($miss_req_session->getPassZipcode());
     $person->setCountry($miss_req_session->getPassCountry());
     $person->setEmail($miss_req_session->getPassEmail());
     $person->setDayPhone($miss_req_session->getPassDayPhone());
     $person->setDayComment($miss_req_session->getPassDayComment());
     $person->setEveningPhone($miss_req_session->getPassEvePhone());
     $person->setEveningComment($miss_req_session->getPassEveComment());
     $person->setMobilePhone($miss_req_session->getPassMobilePhone());
     $person->setMobileComment($miss_req_session->getPassMobileComment());
     $person->setPagerPhone($miss_req_session->getPassPagerPhone());
     $person->setPagerComment($miss_req_session->getPassPagerComment());
     $person->setOtherPhone($miss_req_session->getPassOtherPhone());
     $person->setOtherComment($miss_req_session->getPassOtherComment());
     $person->save();
     //set Passenger
     $passenger->setPersonId($person->getId());
     $passenger->setPassengerTypeId($miss_req_session->getPassType());
     $passenger->setDateOfBirth($miss_req_session->getPassDateOfBirth());
     $passenger->setIllness($miss_req_session->getIllness());
     $passenger->setFinancial($miss_req_session->getFinancial());
     $passenger->setPublicConsiderations($miss_req_session->getPassPublicCons());
     $passenger->setPrivateConsiderations($miss_req_session->getPassPrivateCons());
//.........这里部分代码省略.........
开发者ID:yasirgit,项目名称:afids,代码行数:101,代码来源:actions.class.php

示例15: PersonList

 // Skip people who are already in the system
 if ($row['e_mail_address']) {
     $list = new PersonList(array('email' => $row['e_mail_address']));
     if (count($list)) {
         continue;
     }
 }
 $list = new PersonList(array('firstname' => $row['first_name'], 'lastname' => $row['last_name']));
 if (count($list)) {
     continue;
 }
 $person = new Person();
 $person->setFirstname(ucwords(strtolower($row['first_name'])));
 $person->setMiddlename(ucwords(strtolower($row['middle_initial'])));
 $person->setLastname(ucwords(strtolower($row['last_name'])));
 $person->setEmail(strtolower($row['e_mail_address']));
 $person->setPhone($row['home_phone'] ? $row['home_phone'] : $row['bus_phone']);
 if ($row['address']) {
     $row['address'] = preg_replace('/[^a-zA-Z0-9\\-\\&\\s\'\\/]/', '', $row['address']);
     $url = new URL(ADDRESS_SERVICE . '/addresses/parse.php');
     $url->format = 'xml';
     $url->address = $row['address'];
     $parsed = new SimpleXMLElement($url, null, true);
     if ($parsed->street_number && $parsed->street_name) {
         // Look up their address in Master Address
         $url = new URL(ADDRESS_SERVICE . '/home.php');
         $url->queryType = 'address';
         $url->format = 'xml';
         $url->query = $row['address'];
         echo $url->query . " ==> ";
         $xml = new SimpleXMLElement($url, null, true);
开发者ID:CodeForEindhoven,项目名称:uReport,代码行数:31,代码来源:5_constituents.php


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