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


PHP Organization::setName方法代码示例

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


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

示例1: executeProcessNewOrgForm

 public function executeProcessNewOrgForm(sfWebRequest $request)
 {
     $f = $request->getParameter("organization");
     $p = Doctrine::getTable('Principal')->findOneByFedid($this->getUser()->getUsername());
     $o = new Organization();
     $o->setName($f["name"]);
     $o->setDescription($f["description"]);
     $o->setCreatedAt(date('Y-m-d H:i:s'));
     $o->save();
     $op = new OrganizationPrincipal();
     $op->setOrganization($o);
     $op->setPrincipal($p);
     $op->save();
     $i = new Invitation();
     $i->setEmail($p->getEmail());
     $i->setOrganization($o);
     $i->setUuid('1');
     $i->setCreatedAt(date('Y-m-d H:i:s'));
     $i->setAcceptAt(date('Y-m-d H:i:s'));
     $i->setCounter(1);
     $i->setInviter($p);
     $i->setPrincipal($p);
     $i->setStatus("accepted");
     $i->save();
     $r = new Role();
     $r->setName($f["role_name"]);
     $r->setOrganization($o);
     $r->setShoworder(0);
     $r->save();
     $o->setDefaultRoleId($r->getId());
     $o->save();
     $this->redirect("show/index?id=" . $o->getId());
 }
开发者ID:br00k,项目名称:yavom,代码行数:33,代码来源:actions.class.php

示例2: function

 * creates new organization
 */
$app->post('/organizations', function () use($app) {
    disable_cache($app);
    // only admins can create orgs
    if_is_admin(function () use($app) {
        try {
            $params = json_decode($app->request()->getBody(), true);
            // check if organization id already exists
            if (OrganizationQuery::create()->findPk($params['id'])) {
                error('id-already-exists', 'Sorry, there is already an organization with that id.');
                return;
            }
            $org = new Organization();
            $org->setId(strtolower($params['id']));
            $org->setName($params['name']);
            if (isset($params['default_theme'])) {
                $org->setDefaultTheme($params['default_theme']);
            }
            $org->setCreatedAt(time());
            $org->save();
            ok();
        } catch (Exception $e) {
            error('io-error', $e->getMessage());
        }
    });
});
/*
 * change organization
 */
$app->put('/organizations/:id', function ($org_id) use($app) {
开发者ID:Halfnhav4,项目名称:datawrapper,代码行数:31,代码来源:organizations.php

示例3: testSetName

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

示例4: 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

示例5: getPeople


//.........这里部分代码省略.........
             */
             //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;
                 }
                 $fetchedOrg = true;
             }
开发者ID:vicentborja,项目名称:ATutor,代码行数:67,代码来源:ATutorDbFetcher.php

示例6: 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);
 }
开发者ID:jkinner,项目名称:ringside,代码行数:22,代码来源:RingsidePeopleService.php


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