public function getTeams() { $teams = $this->getTeamsRaw(); $return = []; foreach ($teams as $t) { $team = new Element\TeamSimple(); $team->populate($t); $return[] = $team; } return $return; }
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; }
public function load($team_id) { parent::load($team_id); // todo: load rounds }