コード例 #1
0
ファイル: Element.php プロジェクト: mlntn/fpl-api
 public function getTeams()
 {
     $teams = $this->getTeamsRaw();
     $return = [];
     foreach ($teams as $t) {
         $team = new Element\TeamSimple();
         $team->populate($t);
         $return[] = $team;
     }
     return $return;
 }
コード例 #2
0
ファイル: PlayerSimple.php プロジェクト: mlntn/fpl-api
 public function populate($player)
 {
     $this->id = $player[0];
     $this->first_name = $player[3];
     $this->last_name = $player[4];
     $this->display_name = $player[5];
     $team = new TeamSimple();
     $team->load($player[57]);
     $this->team = $team;
     $position = new Position();
     $position->load($player[56]);
     $this->position = $position;
 }
コード例 #3
0
ファイル: Team.php プロジェクト: mlntn/fpl-api
 public function load($team_id)
 {
     parent::load($team_id);
     // todo: load rounds
 }