1465 lines
27 KiB
PHP
1465 lines
27 KiB
PHP
<?php
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* TravelBooking
|
|
*
|
|
* @ORM\Table(name="travel_booking", indexes={@ORM\Index(name="FK_travel_booking_travel_period", columns={"period_id"}), @ORM\Index(name="FK_travel_booking_travel_program", columns={"program_id"})})
|
|
* @ORM\Entity(repositoryClass="AppBundle\Entity\TravelBookingRepository")
|
|
*/
|
|
class TravelBooking
|
|
{
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="ip", type="string", length=255, nullable=true)
|
|
*/
|
|
private $ip;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="created", type="datetime", nullable=true)
|
|
*/
|
|
private $created;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="program_name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $programName;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="program_id", type="integer", nullable=true)
|
|
*/
|
|
private $programId;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="period_id", type="integer", nullable=true)
|
|
*/
|
|
private $periodId;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="class", type="string", length=255, nullable=true)
|
|
*/
|
|
private $class;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="salutation_id", type="integer", nullable=true)
|
|
*/
|
|
private $salutationId;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="first_name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $firstName;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="last_name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $lastName;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="street", type="string", length=255, nullable=true)
|
|
*/
|
|
private $street;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="zipcode", type="string", length=255, nullable=true)
|
|
*/
|
|
private $zipcode;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="city", type="string", length=255, nullable=true)
|
|
*/
|
|
private $city;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="country_id", type="integer", nullable=true)
|
|
*/
|
|
private $countryId;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="email", type="string", length=255, nullable=true)
|
|
*/
|
|
private $email;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="phone", type="string", length=255, nullable=true)
|
|
*/
|
|
private $phone;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="mobile", type="string", length=255, nullable=true)
|
|
*/
|
|
private $mobile;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="selected_departure", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $selectedDeparture;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="selected_start_date", type="date", nullable=true)
|
|
*/
|
|
private $selectedStartDate;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="selected_end_date", type="date", nullable=true)
|
|
*/
|
|
private $selectedEndDate;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="selected_adults", type="integer", nullable=true)
|
|
*/
|
|
private $selectedAdults;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="selected_childs", type="integer", nullable=true)
|
|
*/
|
|
private $selectedChilds;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="drafts", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $drafts;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="service_items", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $serviceItems;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="arrangements", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $arrangements;
|
|
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="rooms", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $rooms;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="participants", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $participants;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="participants_total", type="integer", nullable=true)
|
|
*/
|
|
private $participantsTotal;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="selected_travel", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $selectedTravel;
|
|
|
|
/**
|
|
* @var float
|
|
*
|
|
* @ORM\Column(name="price", type="float", precision=10, scale=2, nullable=true)
|
|
*/
|
|
private $price;
|
|
|
|
|
|
/**
|
|
* @var float
|
|
*
|
|
* @ORM\Column(name="price_total", type="float", precision=10, scale=2, nullable=true)
|
|
*/
|
|
private $priceTotal;
|
|
|
|
/**
|
|
* @var float
|
|
*
|
|
* @ORM\Column(name="deposit_total", type="float", precision=10, scale=2, nullable=true)
|
|
*/
|
|
private $depositTotal;
|
|
|
|
/**
|
|
* @var float
|
|
*
|
|
* @ORM\Column(name="final_payment", type="float", precision=10, scale=2, nullable=true)
|
|
*/
|
|
private $finalPayment;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="final_payment_date", type="date", nullable=true)
|
|
*/
|
|
private $finalPaymentDate;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="comments", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $comments;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="insurance_name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $insuranceName;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="insurances", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $insurances;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="insurance_offer", type="string", length=255, nullable=true)
|
|
*/
|
|
private $insuranceOffer;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="travel_cancellation", type="integer", nullable=true)
|
|
*/
|
|
private $travelCancellation;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="options", type="text", length=65535, nullable=true)
|
|
*/
|
|
private $options;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="class_options", type="text", length=65535, nullable=false)
|
|
*/
|
|
private $classOptions;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="extra_category", type="text", length=65535, nullable=false)
|
|
*/
|
|
private $extraCategory;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="accept_legal_rights", type="integer", nullable=false)
|
|
*/
|
|
private $acceptLegalRights;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="IDENTITY")
|
|
*/
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
* Set ip
|
|
*
|
|
* @param string $ip
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setIp($ip)
|
|
{
|
|
$this->ip = $ip;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get ip
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getIp()
|
|
{
|
|
return $this->ip;
|
|
}
|
|
|
|
/**
|
|
* Set created
|
|
*
|
|
* @param \DateTime $created
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setCreated($created)
|
|
{
|
|
$this->created = $created;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get created
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getCreated()
|
|
{
|
|
return $this->created;
|
|
}
|
|
|
|
/**
|
|
* Set programName
|
|
*
|
|
* @param string $programName
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setProgramName($programName)
|
|
{
|
|
$this->programName = $programName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get programName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getProgramName()
|
|
{
|
|
return $this->programName;
|
|
}
|
|
|
|
/**
|
|
* Set programId
|
|
*
|
|
* @param integer $programId
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setProgramId($programId)
|
|
{
|
|
$this->programId = $programId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get programId
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getProgramId()
|
|
{
|
|
return $this->programId;
|
|
}
|
|
|
|
/**
|
|
* Set periodId
|
|
*
|
|
* @param integer $periodId
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setPeriodId($periodId)
|
|
{
|
|
$this->periodId = $periodId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get periodId
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getPeriodId()
|
|
{
|
|
return $this->periodId;
|
|
}
|
|
|
|
/**
|
|
* Set class
|
|
*
|
|
* @param string $class
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setClass($class)
|
|
{
|
|
$this->class = $class;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get class
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getClass()
|
|
{
|
|
return $this->class;
|
|
}
|
|
|
|
/**
|
|
* Set salutationId
|
|
*
|
|
* @param integer $salutationId
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSalutationId($salutationId)
|
|
{
|
|
$this->salutationId = $salutationId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get salutationId
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getSalutationId()
|
|
{
|
|
return $this->salutationId;
|
|
}
|
|
|
|
/**
|
|
* Set firstName
|
|
*
|
|
* @param string $firstName
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setFirstName($firstName)
|
|
{
|
|
$this->firstName = $firstName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get firstName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getFirstName()
|
|
{
|
|
return $this->firstName;
|
|
}
|
|
|
|
/**
|
|
* Set lastName
|
|
*
|
|
* @param string $lastName
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setLastName($lastName)
|
|
{
|
|
$this->lastName = $lastName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get lastName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getLastName()
|
|
{
|
|
return $this->lastName;
|
|
}
|
|
|
|
/**
|
|
* Set street
|
|
*
|
|
* @param string $street
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setStreet($street)
|
|
{
|
|
$this->street = $street;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get street
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getStreet()
|
|
{
|
|
return $this->street;
|
|
}
|
|
|
|
/**
|
|
* Set zipcode
|
|
*
|
|
* @param string $zipcode
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setZipcode($zipcode)
|
|
{
|
|
$this->zipcode = $zipcode;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get zipcode
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getZipcode()
|
|
{
|
|
return $this->zipcode;
|
|
}
|
|
|
|
/**
|
|
* Set city
|
|
*
|
|
* @param string $city
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setCity($city)
|
|
{
|
|
$this->city = $city;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get city
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCity()
|
|
{
|
|
return $this->city;
|
|
}
|
|
|
|
/**
|
|
* Set countryId
|
|
*
|
|
* @param integer $countryId
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setCountryId($countryId)
|
|
{
|
|
$this->countryId = $countryId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get countryId
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getCountryId()
|
|
{
|
|
return $this->countryId;
|
|
}
|
|
|
|
/**
|
|
* Set email
|
|
*
|
|
* @param string $email
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setEmail($email)
|
|
{
|
|
$this->email = $email;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get email
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getEmail()
|
|
{
|
|
return $this->email;
|
|
}
|
|
|
|
/**
|
|
* Set phone
|
|
*
|
|
* @param string $phone
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setPhone($phone)
|
|
{
|
|
$this->phone = $phone;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get phone
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getPhone()
|
|
{
|
|
return $this->phone;
|
|
}
|
|
|
|
/**
|
|
* Set mobile
|
|
*
|
|
* @param string $mobile
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setMobile($mobile)
|
|
{
|
|
$this->mobile = $mobile;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get mobile
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getMobile()
|
|
{
|
|
return $this->mobile;
|
|
}
|
|
|
|
/**
|
|
* Set selectedTravel
|
|
*
|
|
* @param string $selectedTravel
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedTravel($selectedTravel)
|
|
{
|
|
$this->selectedTravel = is_array($selectedTravel) ? json_encode($selectedTravel) : $selectedTravel;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedTravel
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getSelectedTravel()
|
|
{
|
|
$ret = json_decode($this->selectedTravel, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->selectedTravel;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set selectedDeparture
|
|
*
|
|
* @param string $selectedDeparture
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedDeparture($selectedDeparture)
|
|
{
|
|
$this->selectedDeparture = is_array($selectedDeparture) ? json_encode($selectedDeparture) : $selectedDeparture;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedDeparture
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getSelectedDeparture()
|
|
{
|
|
$ret = json_decode($this->selectedDeparture, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->selectedDeparture;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set selectedStartDate
|
|
*
|
|
* @param \DateTime $selectedStartDate
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedStartDate($selectedStartDate)
|
|
{
|
|
$this->selectedStartDate = $selectedStartDate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedStartDate
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getSelectedStartDate()
|
|
{
|
|
return $this->selectedStartDate;
|
|
}
|
|
|
|
/**
|
|
* Set selectedEndDate
|
|
*
|
|
* @param \DateTime $selectedEndDate
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedEndDate($selectedEndDate)
|
|
{
|
|
$this->selectedEndDate = $selectedEndDate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedEndDate
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getSelectedEndDate()
|
|
{
|
|
return $this->selectedEndDate;
|
|
}
|
|
|
|
/**
|
|
* Set selectedAdults
|
|
*
|
|
* @param integer $selectedAdults
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedAdults($selectedAdults)
|
|
{
|
|
$this->selectedAdults = $selectedAdults;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedAdults
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getSelectedAdults()
|
|
{
|
|
return $this->selectedAdults;
|
|
}
|
|
|
|
/**
|
|
* Set selectedChilds
|
|
*
|
|
* @param integer $selectedChilds
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedChilds($selectedChilds)
|
|
{
|
|
$this->selectedChilds = $selectedChilds;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedChilds
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getSelectedChilds()
|
|
{
|
|
return $this->selectedChilds;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Set selectedChild3
|
|
*
|
|
* @param integer $selectedChild3
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setSelectedChild3($selectedChild3)
|
|
{
|
|
$this->selectedChild3 = $selectedChild3;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get selectedChild3
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getSelectedChild3()
|
|
{
|
|
return $this->selectedChild3;
|
|
}
|
|
|
|
|
|
/**
|
|
* Set drafts
|
|
*
|
|
* @param string $drafts
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setDrafts($drafts)
|
|
{
|
|
$this->drafts = is_array($drafts) ? json_encode($drafts) : $drafts;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get drafts
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDrafts()
|
|
{
|
|
$ret = json_decode($this->drafts, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->drafts;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
|
|
/**
|
|
* Set rooms
|
|
*
|
|
* @param string $rooms
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setRooms($rooms)
|
|
{
|
|
$this->rooms = is_array($rooms) ? json_encode($rooms) : $rooms;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get rooms
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getRooms()
|
|
{
|
|
$ret = json_decode($this->rooms, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->rooms;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set rooms
|
|
*
|
|
* @param string $serviceItems
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setServiceItems($serviceItems)
|
|
{
|
|
$this->serviceItems = is_array($serviceItems) ? json_encode($serviceItems) : $serviceItems;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get serviceItems
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getServiceItems()
|
|
{
|
|
$ret = json_decode($this->serviceItems, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->serviceItems;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set rooms
|
|
*
|
|
* @param string $arrangements
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setArrangements($arrangements)
|
|
{
|
|
$this->arrangements = is_array($arrangements) ? json_encode($arrangements) : $arrangements;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get arrangements
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getArrangements()
|
|
{
|
|
$ret = json_decode($this->arrangements, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->arrangements;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set participants
|
|
*
|
|
* @param Traveler[] $travelers
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setParticipants($travelers)
|
|
{
|
|
if (!is_array($travelers))
|
|
{
|
|
$this->participants = $travelers;
|
|
return $this;
|
|
}
|
|
|
|
$participants = [];
|
|
foreach($travelers as $traveler)
|
|
{
|
|
|
|
$birthdate = $traveler->getBirthDate();
|
|
if(!strtotime($birthdate)){
|
|
$birthdate = '01.01.1900';
|
|
}
|
|
$participants[] = [
|
|
'gender' => $traveler->getSex(),
|
|
'first_name' => $traveler->getFirstName(),
|
|
'last_name' => $traveler->getLastName(),
|
|
'birthday' => $birthdate,
|
|
'nationality' => $traveler->getNationality(),
|
|
'child' => $traveler->isChild(),
|
|
'acceptEntryRequirements' => $traveler->isAcceptEntryRequirements(),
|
|
];
|
|
}
|
|
|
|
$this->participants = json_encode($participants);
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get participants
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getParticipants()
|
|
{
|
|
$participants = json_decode($this->participants, true);
|
|
if (empty($participants) || !is_array($participants))
|
|
{
|
|
return $this->participants;
|
|
}
|
|
$ret = [];
|
|
foreach ($participants as $participant)
|
|
{
|
|
$traveler = new Traveler();
|
|
$traveler->setSex(intval($participant['gender']));
|
|
$traveler->setFirstName($participant['first_name']);
|
|
$traveler->setLastName($participant['last_name']);
|
|
$traveler->setNationality($participant['nationality']);
|
|
$traveler->setChild($participant['child']);
|
|
if(!strtotime($participant['birthday'])){
|
|
$participant['birthday'] = '01.01.1900';
|
|
}
|
|
$traveler->setBirthDate(\DateTime::createFromFormat('d.m.Y', $participant['birthday']));
|
|
$ret[] = $traveler;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set participantsTotal
|
|
*
|
|
* @param integer $participantsTotal
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setParticipantsTotal($participantsTotal)
|
|
{
|
|
$this->participantsTotal = $participantsTotal;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get participantsTotal
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getParticipantsTotal()
|
|
{
|
|
return $this->participantsTotal;
|
|
}
|
|
|
|
/**
|
|
* Set price
|
|
*
|
|
* @param float $price
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setPrice($price)
|
|
{
|
|
$this->price = $price;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get price
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getPrice()
|
|
{
|
|
return $this->price;
|
|
}
|
|
|
|
/**
|
|
* Set priceTotal
|
|
*
|
|
* @param float $priceTotal
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setPriceTotal($priceTotal)
|
|
{
|
|
$this->priceTotal = $priceTotal;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get priceTotal
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getPriceTotal()
|
|
{
|
|
return $this->priceTotal;
|
|
}
|
|
|
|
/**
|
|
* Set depositTotal
|
|
*
|
|
* @param float $depositTotal
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setDepositTotal($depositTotal)
|
|
{
|
|
$this->depositTotal = $depositTotal;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get depositTotal
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getDepositTotal()
|
|
{
|
|
return $this->depositTotal;
|
|
}
|
|
|
|
/**
|
|
* Set finalPayment
|
|
*
|
|
* @param float $finalPayment
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setFinalPayment($finalPayment)
|
|
{
|
|
$this->finalPayment = $finalPayment;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get finalPayment
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getFinalPayment()
|
|
{
|
|
return $this->finalPayment;
|
|
}
|
|
|
|
/**
|
|
* Set finalPaymentDate
|
|
*
|
|
* @param \DateTime $finalPaymentDate
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setFinalPaymentDate($finalPaymentDate)
|
|
{
|
|
$this->finalPaymentDate = $finalPaymentDate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get finalPaymentDate
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getFinalPaymentDate()
|
|
{
|
|
return $this->finalPaymentDate;
|
|
}
|
|
|
|
|
|
/**
|
|
* Set comments
|
|
*
|
|
* @param string $comments
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setComments($comments)
|
|
{
|
|
$this->comments = $comments;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get comments
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getComments()
|
|
{
|
|
return $this->comments;
|
|
}
|
|
|
|
/**
|
|
* Set insuranceName
|
|
*
|
|
* @param string $insuranceName
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setInsuranceName($insuranceName)
|
|
{
|
|
$this->insuranceName = $insuranceName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get insuranceName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getInsuranceName()
|
|
{
|
|
return $this->insuranceName;
|
|
}
|
|
|
|
/**
|
|
* Set insurances
|
|
*
|
|
* @param string $insurances
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setInsurances($insurances)
|
|
{
|
|
$this->insurances = is_array($insurances) ? json_encode($insurances) : $insurances;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get insurances
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getInsurances()
|
|
{
|
|
$ret = json_decode($this->insurances, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->insurances;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set insuranceOffer
|
|
*
|
|
* @param string $insuranceOffer
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setInsuranceOffer($insuranceOffer)
|
|
{
|
|
$this->insuranceOffer = $insuranceOffer;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get insuranceOffer
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getInsuranceOffer()
|
|
{
|
|
return $this->insuranceOffer;
|
|
}
|
|
|
|
/**
|
|
* Set travelCancellation
|
|
*
|
|
* @param string $travelCancellation
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setTravelCancellation($travelCancellation)
|
|
{
|
|
$this->travelCancellation = $travelCancellation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get travelCancellation
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getTravelCancellation()
|
|
{
|
|
return $this->travelCancellation;
|
|
}
|
|
|
|
|
|
/**
|
|
* Set options
|
|
*
|
|
* @param string $options
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setOptions($options)
|
|
{
|
|
$this->options = is_array($options) ? json_encode($options) : $options;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get options
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getOptions()
|
|
{
|
|
$ret = json_decode($this->options, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->options;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set classOptions
|
|
*
|
|
* @param string $classOptions
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setClassOptions($classOptions)
|
|
{
|
|
$this->classOptions = is_array($classOptions) ? json_encode($classOptions) : $classOptions;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get classOptions
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getClassOptions()
|
|
{
|
|
$ret = json_decode($this->classOptions, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->classOptions;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set extraCategory
|
|
*
|
|
* @param string $extraCategory
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setExtraCategory($extraCategory)
|
|
{
|
|
$this->extraCategory = is_array($extraCategory) ? json_encode($extraCategory) : $extraCategory;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get extraCategory
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getExtraCategory()
|
|
{
|
|
$ret = json_decode($this->extraCategory, true);
|
|
if (empty($ret) || !is_array($ret))
|
|
{
|
|
return $this->extraCategory;
|
|
}
|
|
return $ret;
|
|
}
|
|
|
|
/**
|
|
* Set extraCategory
|
|
*
|
|
* @param string $extraCategory
|
|
*
|
|
* @return TravelBooking
|
|
*/
|
|
public function setAcceptLegalRights($acceptLegalRights)
|
|
{
|
|
$this->acceptLegalRights = $acceptLegalRights;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get extraCategory
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getAcceptLegalRights()
|
|
{
|
|
return $this->acceptLegalRights;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
}
|