本文整理汇总了PHP中Organization::setStartDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Organization::setStartDate方法的具体用法?PHP Organization::setStartDate怎么用?PHP Organization::setStartDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Organization
的用法示例。
在下文中一共展示了Organization::setStartDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetStartDate
/**
* Tests Organization->setStartDate()
*/
public function testSetStartDate()
{
$this->Organization->setStartDate('startdate');
$this->assertEquals('startdate', $this->Organization->startDate);
}
示例2: getPeople
//.........这里部分代码省略.........
/*
if (isset($fields['heroes']) || isset($fields['@all'])) {
$strings = array();
$res2 = mysqli_query($db, "select hero from ".TABLE_PREFIX."person_heroes where person_id = " . $person_id);
while (list($data) = @mysqli_fetch_row($res2)) {
$strings[] = $data;
}
$person->setHeroes($strings);
}
*/
//Added with the above profile, interests is in CSV
/*
if (isset($fields['interests']) || isset($fields['@all'])) {
$strings = array();
$res2 = mysqli_query($db, "select interest from ".TABLE_PREFIX."person_interests where person_id = " . $person_id);
while (list($data) = @mysqli_fetch_row($res2)) {
$strings[] = $data;
}
$person->setInterests($strings);
}
*/
$organizations = array();
$fetchedOrg = false;
if (isset($fields['jobs']) || isset($fields['@all'])) {
$sql = "SELECT * FROM " . TABLE_PREFIX . "social_member_position WHERE member_id = " . $member_id;
$res2 = mysql_query($sql, $this->db);
while ($row = mysql_fetch_assoc($res2)) {
$organization = new Organization($row['company']);
$organization->setDescription($row['description']);
$organization->setEndDate($row['to']);
$organization->setField($row['field']);
$organization->setName($row['company']);
$organization->setSalary($row['salary']);
$organization->setStartDate($row['from']);
$organization->setSubField($row['']);
$organization->setTitle($row['title']);
$organization->setWebpage($row['webpage']);
$organization->setType('job');
//TODO: Address: To be implemented
/*
if ($row['address_id']) {
$res3 = mysqli_query($db, "select * from ".TABLE_PREFIX."addresses where id = " . mysqli_real_escape_string($db, $row['address_id']));
if (mysqli_num_rows($res3)) {
$row = mysqli_fetch_array($res3, MYSQLI_ASSOC);
if (empty($row['unstructured_address'])) {
$row['unstructured_address'] = trim($row['street_address'] . " " . $row['region'] . " " . $row['country']);
}
$addres = new Address($row['unstructured_address']);
$addres->setCountry($row['country']);
$addres->setLatitude($row['latitude']);
$addres->setLongitude($row['longitude']);
$addres->setLocality($row['locality']);
$addres->setPostalCode($row['postal_code']);
$addres->setRegion($row['region']);
$addres->setStreetAddress($row['street_address']);
$addres->setType($row['address_type']);
$organization->setAddress($address);
}
}
*/
$organizations[] = $organization;
}
$fetchedOrg = true;
}
if (isset($fields['schools']) || isset($fields['@all'])) {
$res2 = mysql_query("SELECT * FROM " . TABLE_PREFIX . "social_member_education WHERE member_id = " . $member_id, $this->db);
示例3: convertOrganization
private function convertOrganization($row, $type)
{
$organization = new Organization();
$organization->setDescription($row['description']);
$organization->setEndDate($row['end_date']);
$organization->setField($row['field']);
$organization->setName($row['name']);
$organization->setSalary($row['salary']);
$organization->setStartDate($row['start_date']);
$organization->setSubField($row['sub_field']);
$organization->setTitle($row['title']);
$organization->setType($type);
$organization->setWebpage($row['webpage']);
if ($row['address_id']) {
$res3 = mysqli_query($this->db, "select * from addresses where id = " . $row['address_id']);
if (mysqli_num_rows($res3)) {
$row = mysqli_fetch_array($res3, MYSQLI_ASSOC);
$address = $this->convertAddress($row);
$organization->setLocation($address);
}
}
return $organization;
}
示例4: enforceJobsArray
/**
* Convert FB Jobs into OS array of Organizations.
*
* @param Person $rawOSPerson
*/
private static function enforceJobsArray(Person &$rawOSPerson)
{
$arryJobs = $rawOSPerson->getJobs();
if (is_null($arryJobs)) {
return;
}
$organizations = array();
foreach ($arryJobs as $job) {
$org = new Organization();
$jobLocation = $job['location'];
$org->setAddress($jobLocation['city'] . "," . $jobLocation['state'] . " " . $jobLocation['country']);
$org->setDescription($job['description']);
$org->setStartDate($job['start_date']);
$org->setEndDate($job['end_date']);
$org->setName($job['company_name']);
$org->setTitle($job['position']);
$organizations[] = $org;
}
$rawOSPerson->setJobs($organizations);
}