Example #1
0
 function set_from_flight(flight $flight, $num = 6, $split = false)
 {
     $this->max_flights = $num;
     $this->name = $flight->p_name;
     $this->club = $flight->c_name;
     $this->glider = $flight->g_name;
     $this->score += $flight->score;
     $this->total += $flight->score;
     $this->number_of_flights = 1;
     $this->flights[] = $flight->to_print()->get();
     if ($flight->defined) {
         $this->defined = true;
     } else {
         if ($flight->ftid == 1) {
             $this->undefined = true;
         }
     }
     if ($split) {
         $this->class = $flight->class;
     } else {
         $this->class = 1;
     }
     $this->id = $flight->ClassID;
     $this->name = $flight->p_name;
 }