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


PHP School::GetName方法代码示例

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


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

示例1: OnPrePageLoad

 public function OnPrePageLoad()
 {
     $this->SetPageTitle('Edit ' . $this->school->GetName());
     $this->SetContentConstraint(StoolballPage::ConstrainText());
     $this->LoadClientScript('/scripts/maps-3.js');
     $this->LoadClientScript("/play/schools/edit-school.js");
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:7,代码来源:edit-school.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
     $school_builder = new CollectionBuilder();
     $school = null;
     while ($row = $result->fetch()) {
         # check whether this is a new school
         if (!$school_builder->IsDone($row->club_id)) {
             # store any exisiting school
             if ($school != null) {
                 $this->Add($school);
             }
             # create the new school
             $school = new School($this->GetSettings());
             $school->SetId($row->club_id);
             $school->SetName($row->club_name);
             $school->SetTypeOfClub($row->club_type);
             $school->SetHowManyPlayers($row->how_many_players);
             $school->SetAgeRangeLower($row->age_range_lower);
             $school->SetAgeRangeUpper($row->age_range_upper);
             $school->SetPlaysOutdoors($row->plays_outdoors);
             $school->SetPlaysIndoors($row->plays_indoors);
             $school->SetShortUrl($row->short_url);
             $school->SetTwitterAccount($row->twitter);
             $school->SetFacebookUrl($row->facebook);
             $school->SetInstagramAccount($row->instagram);
             $school->SetClubmarkAccredited($row->clubmark);
             # Infer partial address from school name
             $school_name = $school->GetName();
             $comma = strrpos($school_name, ",");
             if ($comma !== false) {
                 $school->Ground()->GetAddress()->SetTown(trim(substr($school_name, $comma + 1)));
                 $school->Ground()->GetAddress()->SetPaon(substr($school_name, 0, $comma));
             }
         }
         # team the only cause of multiple rows (so far) so add to current school
         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);
             $school->Add($team);
         }
     }
     # store final club
     if ($school != null) {
         $this->Add($school);
     }
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:55,代码来源:school-manager.class.php


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