本文整理汇总了PHP中Organization::setEndDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Organization::setEndDate方法的具体用法?PHP Organization::setEndDate怎么用?PHP Organization::setEndDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Organization
的用法示例。
在下文中一共展示了Organization::setEndDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetEndDate
/**
* Tests Organization->setEndDate()
*/
public function testSetEndDate()
{
$this->Organization->setEndDate('enddate');
$this->assertEquals('enddate', $this->Organization->endDate);
}
示例2: getPeople
//.........这里部分代码省略.........
$person->setFood($foods);
}
*/
//TODO: Not in ATutor yet, skeleton field
/*
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;
}
示例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: enforceSchoolsArray
/**
* Convert FB fql object into and array of OS Organizations
*
* @param Person $rawOSPerson
*/
private static function enforceSchoolsArray(Person &$rawOSPerson)
{
$arrySchools = $rawOSPerson->getSchools();
if (is_null($arrySchools)) {
return;
}
$schools = array();
foreach ($arrySchools as $school) {
$org = new Organization();
$org->setDescription($school['description']);
$org->setEndDate($school['year']);
$org->setName($school['name']);
$org->setTitle(implode(',', $school['concentrations']));
$schools[] = $org;
}
$rawOSPerson->setSchools($schools);
}