Пример #1
0
 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;
 }
Пример #2
0
 /**
  * @param int $position_id
  * @return \Fpl\Element\Position
  */
 public function getPosition($position_id)
 {
     $position = new Element\Position();
     $position->load($position_id);
     return $position;
 }