type = $type; for($i = 0; $i < $this->type; $i++) { $this->travelers[] = new Traveler(); } $this->travelerCount = $type; } /** * @return int */ public function getType() { return $this->type; } /** * @param int $type */ public function setType($type) { $this->type = $type; } /** * @return Traveler[] */ public function getTravelers() { return $this->travelers; } /** * @param Traveler[] $travelers */ public function setTravelers($travelers) { $this->travelers = $travelers; } /** * @return mixed */ public function getTravelerCount() { return $this->travelerCount; } /** * @param mixed $travelerCount */ public function setTravelerCount($travelerCount) { $this->travelerCount = $travelerCount; } }