本文整理汇总了PHP中Contact::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Contact::getEmail方法的具体用法?PHP Contact::getEmail怎么用?PHP Contact::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::getEmail方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
function update(Contact $contact) {
$id = $contact->getId();
if ($id == "" && $contact->getEmail() != "") {
/* on va rechercher par rapport à l'adresse Email */
$id = $this->recherche_email($contact->getEmail());
if ($id === false) {
} else {
$contact->setId($id);
}
}
if ($contact->getId() == '') {
/* Il faut faire une création et pas un update */
} else {
$elt = $contact->toAdd();
$response = $this->mySforceConnection->update(array($elt), 'Contact');
if ($response[0]->success) {
} else {
print_r($response);
$msg = implode(';', $response[0]->errors);
return $msg;
}
}
return true;
}
示例2: bindValueAndExecuteInsertOrUpdate
private function bindValueAndExecuteInsertOrUpdate(PDOStatement $stm, Contact $contact)
{
$stm->bindValue(':name', $contact->getName(), PDO::PARAM_STR);
$stm->bindValue(':photo', $contact->getPhoto(), PDO::PARAM_STR);
$stm->bindValue(':email', $contact->getEmail(), PDO::PARAM_STR);
return $stm->execute();
}
示例3: displayForm
public function displayForm($mysql, $cid = 0, $ownerid = 0) {
$name = "";
$email = "";
$phone = "";
if($cid != 0) {
$con = new Contact();
switch($con->select($cid, $ownerid, $mysql)) {
case Contact::DATABASE_ERROR :
{
echo "<p>A Database error has occured.</p>";
return;
}
case Contact::INVALID_DATA :
{
echo "<p>Invalid operation requested.</p>";
return;
}
case Contact::SELECT_SUCCESS :
{
$name = $con->getName();
$email = $con->getEmail();
$phone = $con->getPhone();
break;
}
default :
break;
}
}
echo <<<FORM
<div id="contact">
<form action="" method="POST">
<input type='hidden' name='cid' value='$cid'>
<table>
<tbody>
<tr>
<td>Name</td>
<td><input type="text" name="cname" value="$name"/></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" value="$email"/></td>
</tr>
<tr>
<td>Phone</td>
<td><input type="text" name="phone" value="$phone"/></td>
</tr>
<tr>
<td><input type="reset" value="Reset"/></td>
<td><input type="submit" name="action" value="Save"/></td>
</tr>
</tbody>
</table>
</form>
</div>
FORM;
}
示例4: editContact
public function editContact(Contact $contact)
{
$obj = $this->db[$contact->getId()];
$obj->setName($contact->getName());
$obj->setPhoneContact($contact->getPhoneContact());
$obj->setEmail($contact->getEmail());
$this->db[$contact->getId()] = $obj;
}
示例5: add
/**
* @param Contact $contact
*
* @return void
*/
public function add($contact)
{
if (!$this->exists(function ($key, Contact $element) use($contact) {
return $contact->getEmail() == $element->getEmail();
})) {
parent::add($contact);
}
}
示例6: testContact
public function testContact()
{
$contact = new Contact('firstname', 'lastname', 'organisation', 'address1', 'address2', 'address3', 'suburb', 'state', new Country('AU'), 'postcode', new Phone('+61.111111111'), new Email('foo@example.com'), new Phone('+61.222222222'));
$this->assertEquals('firstname', $contact->getFirstname());
$this->assertEquals('lastname', $contact->getLastname());
$this->assertEquals('organisation', $contact->getOrganisation());
$this->assertEquals('address1', $contact->getAddress1());
$this->assertEquals('address2', $contact->getAddress2());
$this->assertEquals('address3', $contact->getAddress3());
$this->assertEquals('suburb', $contact->getSuburb());
$this->assertEquals('state', $contact->getState());
$this->assertInstanceOf('SynergyWholesale\\Types\\Country', $contact->getCountry());
$this->assertEquals('AU', $contact->getCountry()->getCountryCode());
$this->assertEquals('postcode', $contact->getPostcode());
$this->assertInstanceOf('SynergyWholesale\\Types\\Phone', $contact->getPhone());
$this->assertEquals('+61.111111111', $contact->getPhone()->getPhone());
$this->assertInstanceOf('SynergyWholesale\\Types\\Email', $contact->getEmail());
$this->assertEquals('foo@example.com', $contact->getEmail()->getEmail());
$this->assertInstanceOf('SynergyWholesale\\Types\\Phone', $contact->getFax());
$this->assertEquals('+61.222222222', $contact->getFax()->getPhone());
}
示例7: function
<?php
require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../src/JobOpening.php";
require_once __DIR__ . "/../src/Contact.php";
$app = new Silex\Application();
// Home Page
$app->get("/", function () {
return "\n <!DOCTYPE html>\n <html>\n <head>\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n <title>Post a Job</title>\n </head>\n\n <body>\n <div class='container'>\n <div class='row'>\n <div class='col-sm-6'>\n <h1>Post a Job</h1>\n <form action='/results'>\n <div class='form-group'>\n <label for='title'>Enter the job title:</label>\n <input id='title' name='title' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='description'>Enter the job description:</label>\n <input id='description' name='description' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='name'>Enter your name:</label>\n <input id='name' name='name' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='phone'>Enter your phone number:</label>\n <input id='phone' name='phone' class='form-control' type='number'>\n </div>\n <div class='form-group'>\n <label for='email'>Enter your email:</label>\n <input id='email' name='email' class='form-control' type='text'>\n </div>\n <button type='submit' class='btn-success'>Submit</button>\n </form>\n </div>\n </div>\n </div>\n </body>\n </html>";
});
// Results Page
$app->get("/results", function () {
$contact = new Contact($_GET['name'], $_GET['phone'], $_GET['email']);
$newJob = new JobOpening($_GET['title'], $_GET['description'], $contact);
$output = "<h3>Job: " . $newJob->getTitle() . "</h3>\n <h4>Description: " . $newJob->getDescription() . "</h4>\n <p>Name: " . $contact->getName() . "</p>\n <p>Phone: " . $contact->getPhone() . "</p>\n <p>email: " . $contact->getEmail() . "</p><hr>";
return "\n <!DOCTYPE html>\n <html>\n <head>\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n <title>Posted Job</title>\n </head>\n\n <body>\n <div class='container'>\n <div class='row'>\n <div class='col-sm-8'>" . $output . "</div>\n </div>\n </div>\n </body>\n </html>";
});
return $app;
示例8:
<li><label for="last_name" class="required">Last Name</label><br />
<input type="text" name="last_name" id="last_name" class="required"
value="<?php
echo $item->getLast_name();
?>
" /></li>
<li><label for="position">Position</label><br />
<input type="text" name="position" id="position" class="required"
value="<?php
echo $item->getPosition();
?>
" /></li>
<li><label for="email" >Email</label><br />
<input type="text" name="email" id="email"
value="<?php
echo $item->getEmail();
?>
" /></li>
<li><label for="phone" >Phone</label><br />
<input type="text" name="phone" id="phone"
value="<?php
echo $item->getPhone();
?>
" /></li>
</ul>
<?php
// create token
$salt = 'SomeSalt';
$token = sha1(mt_rand(1, 1000000) . $salt);
$_SESSION['token'] = $token;
示例9: update
public function update(Contact $contact)
{
try {
return $this->contactsManagerCollection->update(array('email' => $contact->getEmail()), array('name' => $contact->getName(), 'email' => $contact->getEmail(), 'photo' => $contact->getPhoto()), array('safe' => true));
} catch (MongoCursorException $e) {
//log
}
return false;
}
示例10: Company
function Add_Company_With_Building_With_Specialization($Company_Name, $Company_Name_Amharic, $Category_ID, $Company_Type_ID, $Branch, $Branch_Amharic, $Working_Hours, $Working_Hours_Amharic, $Product_Service, $Product_Service_Amharic, $Registration_Expiration_Date, $Registration_Type, $Building_ID, $Building_Floor, Contact $Contact, $specialization)
{
$query = "START TRANSACTION";
mysqli_query($this->getDbc(), $query);
//First add the company
$query = "INSERT INTO Company (Name,Name_Amharic,Registration_Date) VALUES ('{$Company_Name}','{$Company_Name_Amharic}', Now())";
$result1 = mysqli_query($this->getDbc(), $query);
//get the company id
$added_company_id = $this->getDb()->get_last_id();
//add company category relation
$query = "INSERT INTO Company_Category (Company_ID,Category_ID) VALUES('{$added_company_id}','{$Category_ID}')";
$result2 = mysqli_query($this->getDbc(), $query);
//add company ownership
$query = "INSERT INTO Company_Ownership(Company_ID,Ownership_ID)VALUES('{$added_company_id}','{$Company_Type_ID}')";
$result3 = mysqli_query($this->getDbc(), $query);
//add about company
$query = "INSERT INTO About_Company(Company_ID,Branch,Branch_Amharic,Working_Hours,Working_Hours_Amharic) VALUES('{$added_company_id}','{$Branch}','{$Branch_Amharic}','{$Working_Hours}',\n'{$Working_Hours_Amharic}')";
$result4 = mysqli_query($this->getDbc(), $query);
//add company service
$query = "INSERT INTO company_product_service(Company_ID,Product_Service,Product_Service_Amharic) VALUES('{$added_company_id}','{$Product_Service}','{$Product_Service_Amharic}')";
$result5 = mysqli_query($this->getDbc(), $query);
//add payment status
$query = "INSERT INTO Payment_Status(Company_ID,Expiration_Date,Registration_Type) VALUES ('{$added_company_id}','{$Registration_Expiration_Date}','{$Registration_Type}')";
$result6 = mysqli_query($this->getDbc(), $query);
//increment address
$this->Increment_Address(Belong::COMPANY_WITH_BUILDING);
//get the address id
$added_address_id = $this->getDb()->get_last_id();
//add company address relationship
$query = "INSERT INTO Company_Address (Company_ID,Address_ID) VALUES('{$added_company_id}','{$added_address_id}')";
$result7 = mysqli_query($this->getDbc(), $query);
//add address building floor
$query = "INSERT INTO Address_Building_Floor(Address_ID,Building_ID,Floor) VALUES('{$added_address_id}','{$Building_ID}','{$Building_Floor}')";
$result8 = mysqli_query($this->getDbc(), $query);
//add contact
$Email = $Contact->getEmail();
$House_No = $Contact->getHouseNo();
$FAX = $Contact->getFAX();
$POBOX = $Contact->getPOBOX();
$Telephone = $Contact->getTelephone();
$query = "INSERT INTO Contact (Email,House_No,FAX,POBOX,Telephone) VALUES('{$Email}','{$House_No}','{$FAX}','{$POBOX}','{$Telephone}')";
$result9 = mysqli_query($this->getDbc(), $query);
//get the contact id
$added_contact_id = $this->getDb()->get_last_id();
//add address contact relation
$query = "INSERT INTO Address_Contact (Address_ID,Contact_ID) VALUES('{$added_address_id}','{$added_contact_id}')";
$result10 = mysqli_query($this->getDbc(), $query);
$query = "insert into company_specialization(Company_ID,Spec_1,Spec_2,Spec_3,Spec_4,Spec_5) values('{$added_company_id}',{$specialization['0']},{$specialization['1']},{$specialization['2']},{$specialization['3']},\n{$specialization['4']})";
$result_spec = mysqli_query($this->getDbc(), $query);
if ($result_spec) {
echo "The specilization is added";
} else {
echo "The specliation is not added";
echo $specialization[0];
echo "-> ";
echo $specialization[1];
echo "-> ";
echo $specialization[2];
echo "-> ";
echo $specialization[3];
}
if ($result1 and $result2 and $result3 and $result4 and $result5 and $result6 and $result7 and $result8 and $result9 and $result10 and $result_spec) {
$query = "COMMIT";
mysqli_query($this->getDbc(), $query);
return TRUE;
} else {
$query = "ROLLBACK";
mysqli_query($this->getDbc(), $query);
echo "Rolled back";
// return FALSE;
exit;
}
}
示例11: function
<?php
return "";
});
$app->get("/posting", function () {
$job_opening = new JobOpening($_GET["title"], $_GET["des"]);
$contact = new Contact($_GET["phone"], $_GET["email"], $_GET["address"]);
?>
<p><?php
echo $job_opening->getTitle();
?>
</p>
<p><?php
echo $job_opening->getDes();
?>
</p>
<p><?php
echo $contact->getPhone();
?>
</p>
<p><?php
echo $contact->getEmail();
?>
</p>
<p><?php
echo $contact->getAddress();
?>
</p>
<?php
return "";
});
return $app;
示例12: function
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../src/JobOpening.php';
require_once __DIR__ . '/../src/Contact.php';
$app = new Silex\Application();
$app->get("/", function () {
return "\n <!DOCTYPE html>\n <html>\n <head>\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n <link rel='stylesheet' href='css/styles.css'>\n <title>Job Board</title>\n </head>\n <body>\n <div class='container'>\n <h1>Job Board</h1>\n <form action='/job'>\n <div class='form-group'>\n <label for='title'>Enter job title:</label>\n <input id='title' name='title' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='description'>Enter job description:</label>\n <input id='description' name='description' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='name'>Enter your name:</label>\n <input id='name' name='name' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='phone_number'>Enter phone number: </label>\n <input id='phone_number' name='phone_number' class='form-control' type='text'>\n </div>\n <div class='form-group'>\n <label for='email'>Enter your email:</label>\n <input id='email' name='email' class='form-control' type='text'>\n </div>\n <button type='submit' class='btn-primary'>Submit</button>\n </form>\n </div>\n </body>\n </html>\n ";
});
$app->get("/job", function () {
$new_job = new JobOpening($_GET["title"], $_GET["description"]);
$new_contact = new Contact($_GET["name"], $_GET["phone_number"], $_GET["email"]);
$output = "";
$output = $output . "<div class='box'><p>Title: " . $new_job->getTitle() . "</p>\n <p> Description: " . $new_job->getDescription() . "</p>\n <p> Name: " . $new_contact->getName() . "</p>\n <p> Phone Number: " . $new_contact->getPhoneNumber() . "</p>\n <p> Email: " . $new_contact->getEmail() . "</div></p>";
return "\n <!DOCTYPE html>\n <html>\n <head>\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n <link rel='stylesheet' href='css/styles.css'>\n <title>Job Posted!</title>\n </head>\n <body>\n <div class='container'>\n <h1>Your job has been posted!</h1>\n <h3>The job details are:</h3>\n <p>{$output}</p>\n </div>\n </body>\n </html>\n ";
});
return $app;
示例13: getRequestDataForUpdate
private function getRequestDataForUpdate(Contact $contact)
{
$data = array('chg' => array('voice' => $contact->getPhoneNumber(), 'fax' => $contact->getFaxNumber(), 'email' => $contact->getEmail(), 'postalInfo' => array(Contact::POSTALINFO_INT => $contact->getPostalInfo(Contact::POSTALINFO_INT))));
if (!empty($contact->getPostalInfo(Contact::POSTALINFO_LOCAL)['name'])) {
$data['chg']['postalInfo'][Contact::POSTALINFO_LOCAL] = $contact->getPostalInfo(Contact::POSTALINFO_LOCAL);
}
return $data;
}
示例14: htmlspecialchars
<li><label for="last_name" class="required">Last Name</label><br />
<input type="text" name="last_name" id="last_name" class="required"
value="<?php
echo htmlspecialchars($item->getLast_name());
?>
" /></li>
<li><label for="position">Position</label><br />
<input type="text" name="position" id="position" class="required"
value="<?php
echo htmlspecialchars($item->getPosition());
?>
" /></li>
<li><label for="email" >Email</label><br />
<input type="text" name="email" id="email"
value="<?php
echo htmlspecialchars($item->getEmail());
?>
" /></li>
<li><label for="phone" >Phone</label><br />
<input type="text" name="phone" id="phone"
value="<?php
echo htmlspecialchars($item->getPhone());
?>
" /></li>
</ul>
<?php
// create token
$salt = 'SomeSalt';
$token = sha1(mt_rand(1, 1000000) . $salt);
$_SESSION['token'] = $token;
示例15:
function Edit_Company_With_Out_Building($Company_Name, $Company_Name_Amharic, $Category_ID, $Company_Type_ID, $Branch, $Branch_Amharic, $Working_Hours, $Working_Hours_Amharic, $Product_Service, $Product_Service_Amharic, $Registration_Expiration_Date, $Registration_Type, Contact $Contact, Place $place, $Direction, $Direction_Amharic, $Company_ID, $About_Company_ID, $Payment_Status_ID, $Company_Service_ID, $Company_Ownership_ID, $Company_Category_ID, $Contact_ID, $Direction_ID, $Place_ID)
{
//contacts
$Email = $Contact->getEmail();
$House_No = $Contact->getHouseNo();
$FAX = $Contact->getFAX();
$POBOX = $Contact->getPOBOX();
$Telephone = $Contact->getTelephone();
//places
$Region = $place->getRegionID();
$City = $place->getCityID();
$Sub_City = $place->getSubCityID();
$Wereda = $place->getWeredaID();
$Sefer = $place->getSeferID();
$Street = $place->getStreetID();
//start transaction
$query = "START TRANSACTION";
mysqli_query($this->getDbc(), $query);
//1 update the company
$query1 = "update company\n\t\t\t\t\tset name='{$Company_Name}',name_amharic='{$Company_Name_Amharic}'\n\t\t\t\t\twhere ID='{$Company_ID}'";
$result1 = mysqli_query($this->getDbc(), $query1);
//2 udate the about company
$query2 = "update about_company\n\t\t\t\t\tset branch='{$Branch}',branch_amharic='{$Branch_Amharic}',\n\t\t\t\t\tworking_hours='{$Working_Hours}',working_hours_amharic='{$Working_Hours_Amharic}'\n\t\t\t\t\twhere ID='{$About_Company_ID}'";
$result2 = mysqli_query($this->getDbc(), $query2);
//3 update the payment status
$query3 = "update payment_status\n\t\t\t\t\tset Expiration_Date='{$Registration_Expiration_Date}',Registration_Type='{$Registration_Type}'\n\t\t\t\t\twhere ID='{$Payment_Status_ID}'";
$result3 = mysqli_query($this->getDbc(), $query3);
//4 update the company service
$query4 = "update company_product_service\n\t\t\t\tset Product_Service='{$Product_Service}',Product_Service_Amharic='{$Product_Service_Amharic}'\n\t\t\t\twhere ID='{$Company_Service_ID}'";
$result4 = mysqli_query($this->getDbc(), $query4);
//5 update company ownership
$query5 = "update company_ownership\n\t\t\t\t\tset Ownership_ID='{$Company_Type_ID}'\n\t\t\t\t\twhere ID='{$Company_Ownership_ID}'";
$result5 = mysqli_query($this->getDbc(), $query5);
//update company category
$query6 = "update company_category\n\t\t\t\t\tset Category_ID='{$Category_ID}'\n\t\t\t\t\twhere ID='{$Company_Category_ID}'";
$result6 = mysqli_query($this->getDbc(), $query6);
//update the contact
$query7 = "update contact\n\t\t\t\t\tset Email='{$Email}',House_No='{$House_No}',FAX='{$FAX}',\n\t\t\t\t\tPOBOX='{$POBOX}',Telephone='{$Telephone}'\n\t\t\t\t\twhere ID='{$Contact_ID}'";
$result3 = mysqli_query($this->getDbc(), $query7);
//update the direction
$query8 = "update Direction\n\t\t\t\t\tset Direction='{$Direction}',Direction_Amharic='{$Direction_Amharic}'\n\t\t\t\t\twhere ID='{$Direction_ID}'";
$result8 = mysqli_query($this->getDbc(), $query8);
//update the place
$query9 = "update Place\n\t\t\t\t\tset Region='{$Region}',City='{$City}',Sub_City='{$Sub_City}',\n\t\t\t\t\t\tWereda='{$Wereda}',Sefer='{$Sefer}',Street='{$Street}'\n\t\t\t\t\twhere ID='{$Place_ID}'";
$result9 = mysqli_query($this->getDbc(), $query9);
//commit the transaction
$query_last = "COMMIT";
mysqli_query($this->getDbc(), $query_last);
return TRUE;
echo $Registration_Type;
exit;
}