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


PHP Organization::setSubField方法代码示例

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


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

示例1: 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;
 }
开发者ID:vuxuandung,项目名称:Partuza-bundle,代码行数:23,代码来源:PartuzaDbFetcher.php

示例2: testSetSubField

 /**
  * Tests Organization->setSubField()
  */
 public function testSetSubField()
 {
     $this->Organization->setSubField('subfield');
     $this->assertEquals('subfield', $this->Organization->subField);
 }
开发者ID:emma5021,项目名称:toba,代码行数:8,代码来源:OrganizationTest.php

示例3: 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);
                 while ($row = mysql_fetch_assoc($res2)) {
开发者ID:vicentborja,项目名称:ATutor,代码行数:67,代码来源:ATutorDbFetcher.php


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