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


PHP Organization::setType方法代码示例

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


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


//.........这里部分代码省略.........
                 $strings = explode(',', $row['interests']);
                 $person->setInterests($strings);
             }
             //TODO: Not in ATutor yet, skeleton field
             if (!empty($row['smoker'])) {
                 $person->setSmoker($row['smoker']);
             }
             /* the following fields require additional queries so are only executed if requested */
             if (isset($fields['activities']) || isset($fields['@all'])) {
                 $activities = array();
                 $sql = "select title from " . TABLE_PREFIX . "social_activities where member_id = " . $member_id;
                 $res2 = mysql_query($sql, $this->db);
                 while (list($activity) = mysql_fetch_row($res2)) {
                     $activities[] = $activity;
                 }
                 $person->setActivities($activities);
             }
             if (isset($fields['addresses']) || isset($fields['@all'])) {
                 $addresses = array();
                 $sql = "select address, postal, city, province, country from " . TABLE_PREFIX . "members m where m.member_id = " . $member_id;
                 $res2 = mysql_query($sql, $this->db);
                 while ($row = mysql_fetch_assoc($res2)) {
                     if (empty($row['unstructured_address'])) {
                         $row['unstructured_address'] = trim($row['street_address'] . " " . $row['province'] . " " . $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['province']);
                     $addres->setStreetAddress($row['street_address']);
                     $addres->setType($row['address_type']);
                     //FIXME quick and dirty hack to demo PC
                     $addres->setPrimary(true);
                     $addresses[] = $addres;
                 }
                 $person->setAddresses($addresses);
             }
             //TODO: Not in ATutor yet, skeleton field
             /*
                     if (isset($fields['bodyType']) || isset($fields['@all'])) {
                       $res2 = mysql_query($db, "select * from ".TABLE_PREFIX."person_body_type where person_id = " . $person_id);
                       if (@mysql_num_rows($res2)) {
                         $row = @mysql_fetch_assic($res2);
                         $bodyType = new BodyType();
                         $bodyType->setBuild($row['build']);
                         $bodyType->setEyeColor($row['eye_color']);
                         $bodyType->setHairColor($row['hair_color']);
                         $bodyType->setHeight($row['height']);
                         $bodyType->setWeight($row['weight']);
                         $person->setBodyType($bodyType);
                       }
                     }
             */
             //TODO: Not in ATutor yet, skeleton field
             /*
                     if (isset($fields['books']) || isset($fields['@all'])) {
                       $books = array();
                       $res2 = mysqli_query($db, "select book from ".TABLE_PREFIX."person_books where person_id = " . $person_id);
                       while (list($book) = @mysqli_fetch_row($res2)) {
                         $books[] = $book;
                       }
                       $person->setBooks($books);
                     }
开发者ID:vicentborja,项目名称:ATutor,代码行数:67,代码来源:ATutorDbFetcher.php


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