Пример #1
0
 public function addPassanger(Passenger $passenger)
 {
     if ($passenger->isInCar()) {
         $passenger->leaveCar($this);
         $passenger->sitInCar($this);
     }
     $this->passangers[$passenger->getId()] = $passenger;
 }