3 namespace Rapsys\AirBundle\Entity
;
27 private $start = null;
77 private $temperaturemin;
82 private $temperaturemax;
95 * @var \Rapsys\AirBundle\Entity\Application
100 * @var \Rapsys\AirBundle\Entity\Location
105 * @var \Rapsys\AirBundle\Entity\Slot
110 * @var \Doctrine\Common\Collections\Collection
112 private $applications;
117 public function __construct() {
118 $this->applications
= new \Doctrine\Common\Collections\
ArrayCollection();
126 public function getId() {
133 * @param \DateTime $date
137 public function setDate($date) {
148 public function getDate() {
155 * @param \DateTime $begin
159 public function setBegin($begin) {
160 $this->begin
= $begin;
170 public function getBegin() {
179 public function getStart() {
181 if ($this->start
!== null) {
186 $this->start
= clone $this->date
;
188 //Check if after slot
189 if ($this->slot
->getTitle() == 'After') {
191 $this->start
->add(new \
DateInterval('P1D'));
195 return $this->start
->setTime($this->begin
->format('H'), $this->begin
->format('i'), $this->begin
->format('s'));
201 * @param \DateTime $length
205 public function setLength($length) {
206 $this->length
= $length;
216 public function getLength() {
217 return $this->length
;
225 public function getStop() {
227 if ($this->stop
!== null) {
232 $this->stop
= clone $this->getStart();
235 return $this->stop
->add(new \
DateInterval('PT'.$this->length
->format('H').'H'.$this->length
->format('i').'M'.$this->length
->format('s').'S'));
241 * @param boolean $premium
245 public function setPremium($premium) {
246 $this->premium
= $premium;
256 public function getPremium() {
257 return $this->premium
;
263 * @param boolean $rainfall
267 public function setRainfall($rainfall) {
268 $this->rainfall
= $rainfall;
278 public function getRainfall() {
279 return $this->rainfall
;
285 * @param boolean $rainrisk
289 public function setRainrisk($rainrisk) {
290 $this->rainrisk
= $rainrisk;
300 public function getRainrisk() {
301 return $this->rainrisk
;
307 * @param integer $realfeel
311 public function setRealfeel($realfeel) {
312 $this->realfeel
= $realfeel;
322 public function getRealfeel() {
323 return $this->realfeel
;
329 * @param integer $realfeelmin
333 public function setRealfeelmin($realfeelmin) {
334 $this->realfeelmin
= $realfeelmin;
344 public function getRealfeelmin() {
345 return $this->realfeelmin
;
351 * @param integer $realfeelmax
355 public function setRealfeelmax($realfeelmax) {
356 $this->realfeelmax
= $realfeelmax;
366 public function getRealfeelmax() {
367 return $this->realfeelmax
;
373 * @param integer $temperature
377 public function setTemperature($temperature) {
378 $this->temperature
= $temperature;
388 public function getTemperature() {
389 return $this->temperature
;
395 * @param integer $temperaturemin
399 public function setTemperaturemin($temperaturemin) {
400 $this->temperaturemin
= $temperaturemin;
410 public function getTemperaturemin() {
411 return $this->temperaturemin
;
417 * @param integer $temperaturemax
421 public function setTemperaturemax($temperaturemax) {
422 $this->temperaturemax
= $temperaturemax;
432 public function getTemperaturemax() {
433 return $this->temperaturemax
;
439 * @param \DateTime $created
443 public function setCreated($created) {
444 $this->created
= $created;
454 public function getCreated() {
455 return $this->created
;
461 * @param \DateTime $updated
465 public function setUpdated($updated) {
466 $this->updated
= $updated;
476 public function getUpdated() {
477 return $this->updated
;
483 * @param \Rapsys\AirBundle\Entity\Application $application
487 public function addApplication(\Rapsys\AirBundle\Entity\Application
$application) {
488 $this->applications
[] = $application;
496 * @param \Rapsys\AirBundle\Entity\Application $application
498 public function removeApplication(\Rapsys\AirBundle\Entity\Application
$application) {
499 $this->applications
->removeElement($application);
505 * @return \Doctrine\Common\Collections\Collection
507 public function getApplications() {
508 return $this->applications
;
514 * @param \Rapsys\AirBundle\Entity\Location $location
518 public function setLocation(\Rapsys\AirBundle\Entity\Location
$location = null) {
519 $this->location
= $location;
527 * @return \Rapsys\AirBundle\Entity\Location
529 public function getLocation() {
530 return $this->location
;
536 * @param \Rapsys\AirBundle\Entity\Slot $slot
540 public function setSlot(\Rapsys\AirBundle\Entity\Slot
$slot = null) {
549 * @return \Rapsys\AirBundle\Entity\Slot
551 public function getSlot() {
558 * @param \Rapsys\AirBundle\Entity\Application $application
562 public function setApplication(\Rapsys\AirBundle\Entity\Application
$application = null) {
563 $this->application
= $application;
571 * @return \Rapsys\AirBundle\Entity\Application
573 public function getApplication() {
574 return $this->application
;