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


PHP Club::SetTypeOfClub方法代码示例

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


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

示例1: BuildPostedDataObject

 /**
  * @return void
  * @desc Re-build from data posted by this control the data object this control is editing
  */
 public function BuildPostedDataObject()
 {
     $school = new Club($this->GetSettings());
     if (isset($_POST['item'])) {
         $school->SetId($_POST['item']);
     }
     $school->SetTypeOfClub(Club::SCHOOL);
     $school->SetName($_POST['school-name'] . ", " . $_POST["town"]);
     $this->SetDataObject($school);
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:14,代码来源:add-school-control.class.php

示例2: BuildItems

 /**
  * Populates the collection of business objects from raw data
  *
  * @return bool
  * @param MySqlRawData $result
  */
 protected function BuildItems(MySqlRawData $result)
 {
     # use CollectionBuilder to handle duplicates
     $club_builder = new CollectionBuilder();
     $club = null;
     while ($row = $result->fetch()) {
         # check whether this is a new club
         if (!$club_builder->IsDone($row->club_id)) {
             # store any exisiting club
             if ($club != null) {
                 $this->Add($club);
             }
             # create the new club
             $club = new Club($this->GetSettings());
             $club->SetId($row->club_id);
             $club->SetName($row->club_name);
             $club->SetTypeOfClub($row->club_type);
             $club->SetHowManyPlayers($row->how_many_players);
             $club->SetAgeRangeLower($row->age_range_lower);
             $club->SetAgeRangeUpper($row->age_range_upper);
             $club->SetPlaysOutdoors($row->plays_outdoors);
             $club->SetPlaysIndoors($row->plays_indoors);
             $club->SetShortUrl($row->short_url);
             $club->SetTwitterAccount($row->twitter);
             $club->SetFacebookUrl($row->facebook);
             $club->SetInstagramAccount($row->instagram);
             $club->SetClubmarkAccredited($row->clubmark);
         }
         # team the only cause of multiple rows (so far) so add to current club
         if ($row->team_id) {
             $team = new Team($this->GetSettings());
             $team->SetId($row->team_id);
             $team->SetName($row->team_name);
             $team->SetShortUrl($row->team_short_url);
             $club->Add($team);
         }
     }
     # store final club
     if ($club != null) {
         $this->Add($club);
     }
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:48,代码来源:club-manager.class.php

示例3: BuildPostedDataObject

 /**
  * @return void
  * @desc Re-build from data posted by this control the data object this control
  * is editing
  */
 function BuildPostedDataObject()
 {
     $club = new Club($this->GetSettings());
     if (isset($_POST['item'])) {
         $club->SetId($_POST['item']);
     }
     $club->SetName($_POST['name']);
     $club->SetTypeOfClub(isset($_POST['school']) ? Club::SCHOOL : Club::STOOLBALL_CLUB);
     $club->SetHowManyPlayers($_POST['how_many_players']);
     $club->SetAgeRangeLower($_POST['age_range_lower']);
     $club->SetAgeRangeUpper($_POST['age_range_upper']);
     $club->SetPlaysOutdoors(isset($_POST['outdoors']));
     $club->SetPlaysIndoors(isset($_POST['indoors']));
     $club->SetClubmarkAccredited(isset($_POST['clubmark']));
     $club->SetTwitterAccount($_POST['twitter']);
     $club->SetFacebookUrl($_POST['facebook']);
     $club->SetInstagramAccount($_POST['instagram']);
     $club->SetShortUrl($_POST[$this->GetNamingPrefix() . 'ShortUrl']);
     $this->SetDataObject($club);
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:25,代码来源:club-edit-control.class.php


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