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


PHP Club::get_club_id方法代码示例

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


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

示例1: set_opponent

 function set_opponent($opponent, $team)
 {
     $data = explode(" (", $opponent);
     if (strpos($data[1], "H") !== false) {
         // home game
         $this->set_home_team($team);
         $this->set_away_team(Club::get_club_id($data[0]));
     } else {
         $this->set_home_team(Club::get_club_id($data[0]));
         $this->set_away_team($team);
     }
 }
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:12,代码来源:DataFixture.php

示例2: parseDataToObject

 public function parseDataToObject($data)
 {
     try {
         $this->set_transfersOut($data->transfers_out);
         $this->set_playerCode($data->code);
         $this->set_eventTotal($data->event_total);
         $this->set_lastSeasonPoints($data->last_season_points);
         $this->set_squadNumber($data->squad_number);
         $this->set_newsUpdated($data->news_updated);
         $this->set_eventCost($data->event_cost);
         $this->set_newsAdded($data->news_added);
         $this->set_webName($data->web_name);
         $this->set_inDreamTeam($data->in_dreamteam);
         $this->set_teamCode($data->team_code);
         $this->set_id($data->id);
         $this->set_shirtImageUrl($data->shirt_image_url);
         $this->set_firstName($data->first_name);
         $this->set_transfersOutEvent($data->transfers_out_event);
         $this->set_elementTypeId($data->element_type_id);
         $this->set_maxCost($data->max_cost);
         $this->set_eventExplain($data->event_explain);
         $this->set_selected($data->selected);
         $this->set_minCost($data->min_cost);
         $this->set_totalPoints($data->total_points);
         $this->set_typeName($data->type_name);
         $this->set_teamName($data->team_name);
         $this->set_status($data->status);
         $this->set_added($data->added);
         $this->set_form($data->form);
         $this->set_shirtMobileImageUrl($data->shirt_mobile_image_url);
         $this->set_currentFixture($data->current_fixture);
         $this->set_nowCost($data->now_cost);
         $this->set_pointsPerGame($data->points_per_game);
         $this->set_transfersIn($data->transfers_in);
         $this->set_news($data->news);
         $this->set_originalCost($data->original_cost);
         $this->set_eventPoints($data->event_points);
         $this->set_newsReturn($data->news_return);
         $this->set_nextFixture($data->next_fixture);
         $this->set_transfersInEvent($data->transfers_in_event);
         $this->set_selectedBy($data->selected_by);
         $this->set_teamId(Club::get_club_id($this->get_teamName()));
         $this->set_secondName($data->second_name);
         $this->set_photoMobileUrl($data->photo_mobile_url);
         $this->set_fixtures($data->fixtures->all, $this->get_teamId());
         $this->set_seasonHistory($data->season_history);
         $this->set_fixtureHistory($data->id, $data->fixture_history->all);
     } catch (Exception $e) {
         echo "Exception occured";
     }
 }
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:51,代码来源:DataPlayer.php

示例3: parse_past_fixtures

function parse_past_fixtures($allData)
{
    foreach ($allData as $data) {
        $players = array(59936, 1882, 66797, 15144, 11334, 11554, 15337, 10318, 12390, 15749, 51940, 20480, 19236, 18726, 40349, 20531, 39215, 37915, 9089, 42525);
        if (in_array((int) $data->code, $players)) {
            $history = $data->fixture_history->all;
            foreach ($history as $game) {
                $fixture = new DataHistoricalFixture($game, Club::get_club_id($data->team_name));
                $fixture->save();
            }
            echo "Parsed fixtures for {$data->team_name}\n";
        }
    }
}
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:14,代码来源:parse-past-fixtures.php


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