/** * @param pilot|pilot_official $pilot * @param $num */ function set_from_pilot($pilot, $num) { $this->max_pilots = $num; $this->name = $pilot->club; $this->score = $pilot->score; $this->total = $this->score; $this->content = $pilot->output(1); }