3 namespace Rapsys\AirBundle\Entity
;
27 private $start = null;
77 private $temperaturemin;
82 private $temperaturemax;
100 * @var \Rapsys\AirBundle\Entity\Application
102 private $application;
105 * @var \Rapsys\AirBundle\Entity\Location
110 * @var \Rapsys\AirBundle\Entity\Slot
115 * @var \Doctrine\Common\Collections\Collection
117 private $applications;
122 public function __construct() {
123 $this->applications
= new \Doctrine\Common\Collections\
ArrayCollection();
131 public function getId() {
138 * @param \DateTime $date
142 public function setDate($date) {
153 public function getDate() {
160 * @param \DateTime $begin
164 public function setBegin($begin) {
165 $this->begin
= $begin;
175 public function getBegin() {
184 public function getStart() {
186 if ($this->start
!== null) {
191 $this->start
= clone $this->date
;
193 //Check if after slot
194 if ($this->slot
->getTitle() == 'After') {
196 $this->start
->add(new \
DateInterval('P1D'));
200 return $this->start
->setTime($this->begin
->format('H'), $this->begin
->format('i'), $this->begin
->format('s'));
206 * @param \DateTime $length
210 public function setLength($length) {
211 $this->length
= $length;
221 public function getLength() {
222 return $this->length
;
230 public function getStop() {
232 if ($this->stop
!== null) {
237 $this->stop
= clone $this->getStart();
240 return $this->stop
->add(new \
DateInterval('PT'.$this->length
->format('H').'H'.$this->length
->format('i').'M'.$this->length
->format('s').'S'));
246 * @param boolean $premium
250 public function setPremium($premium) {
251 $this->premium
= $premium;
261 public function getPremium() {
262 return $this->premium
;
268 * @param boolean $rainfall
272 public function setRainfall($rainfall) {
273 $this->rainfall
= $rainfall;
283 public function getRainfall() {
284 return $this->rainfall
;
290 * @param boolean $rainrisk
294 public function setRainrisk($rainrisk) {
295 $this->rainrisk
= $rainrisk;
305 public function getRainrisk() {
306 return $this->rainrisk
;
312 * @param integer $realfeel
316 public function setRealfeel($realfeel) {
317 $this->realfeel
= $realfeel;
327 public function getRealfeel() {
328 return $this->realfeel
;
334 * @param integer $realfeelmin
338 public function setRealfeelmin($realfeelmin) {
339 $this->realfeelmin
= $realfeelmin;
349 public function getRealfeelmin() {
350 return $this->realfeelmin
;
356 * @param integer $realfeelmax
360 public function setRealfeelmax($realfeelmax) {
361 $this->realfeelmax
= $realfeelmax;
371 public function getRealfeelmax() {
372 return $this->realfeelmax
;
378 * @param integer $temperature
382 public function setTemperature($temperature) {
383 $this->temperature
= $temperature;
393 public function getTemperature() {
394 return $this->temperature
;
400 * @param integer $temperaturemin
404 public function setTemperaturemin($temperaturemin) {
405 $this->temperaturemin
= $temperaturemin;
415 public function getTemperaturemin() {
416 return $this->temperaturemin
;
422 * @param integer $temperaturemax
426 public function setTemperaturemax($temperaturemax) {
427 $this->temperaturemax
= $temperaturemax;
437 public function getTemperaturemax() {
438 return $this->temperaturemax
;
444 * @param \DateTime $locked
448 public function setLocked($locked) {
449 $this->locked
= $locked;
459 public function getLocked() {
460 return $this->locked
;
466 * @param \DateTime $created
470 public function setCreated($created) {
471 $this->created
= $created;
481 public function getCreated() {
482 return $this->created
;
488 * @param \DateTime $updated
492 public function setUpdated($updated) {
493 $this->updated
= $updated;
503 public function getUpdated() {
504 return $this->updated
;
510 * @param \Rapsys\AirBundle\Entity\Application $application
514 public function addApplication(\Rapsys\AirBundle\Entity\Application
$application) {
515 $this->applications
[] = $application;
523 * @param \Rapsys\AirBundle\Entity\Application $application
525 public function removeApplication(\Rapsys\AirBundle\Entity\Application
$application) {
526 $this->applications
->removeElement($application);
532 * @return \Doctrine\Common\Collections\Collection
534 public function getApplications() {
535 return $this->applications
;
541 * @param \Rapsys\AirBundle\Entity\Location $location
545 public function setLocation(\Rapsys\AirBundle\Entity\Location
$location = null) {
546 $this->location
= $location;
554 * @return \Rapsys\AirBundle\Entity\Location
556 public function getLocation() {
557 return $this->location
;
563 * @param \Rapsys\AirBundle\Entity\Slot $slot
567 public function setSlot(\Rapsys\AirBundle\Entity\Slot
$slot = null) {
576 * @return \Rapsys\AirBundle\Entity\Slot
578 public function getSlot() {
585 * @param \Rapsys\AirBundle\Entity\Application $application
589 public function setApplication(\Rapsys\AirBundle\Entity\Application
$application = null) {
590 $this->application
= $application;
598 * @return \Rapsys\AirBundle\Entity\Application
600 public function getApplication() {
601 return $this->application
;