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 //XXX: id=4 <=> title=After
195 if ($this->slot
->getId() == 4) {
197 $this->start
->add(new \
DateInterval('P1D'));
201 return $this->start
->setTime($this->begin
->format('H'), $this->begin
->format('i'), $this->begin
->format('s'));
207 * @param \DateTime $length
211 public function setLength($length) {
212 $this->length
= $length;
222 public function getLength() {
223 return $this->length
;
231 public function getStop() {
233 if ($this->stop
!== null) {
238 $this->stop
= clone $this->getStart();
241 return $this->stop
->add(new \
DateInterval('PT'.$this->length
->format('H').'H'.$this->length
->format('i').'M'.$this->length
->format('s').'S'));
247 * @param boolean $premium
251 public function setPremium($premium) {
252 $this->premium
= $premium;
262 public function getPremium() {
263 return $this->premium
;
269 * @param boolean $rainfall
273 public function setRainfall($rainfall) {
274 $this->rainfall
= $rainfall;
284 public function getRainfall() {
285 return $this->rainfall
;
291 * @param boolean $rainrisk
295 public function setRainrisk($rainrisk) {
296 $this->rainrisk
= $rainrisk;
306 public function getRainrisk() {
307 return $this->rainrisk
;
313 * @param integer $realfeel
317 public function setRealfeel($realfeel) {
318 $this->realfeel
= $realfeel;
328 public function getRealfeel() {
329 return $this->realfeel
;
335 * @param integer $realfeelmin
339 public function setRealfeelmin($realfeelmin) {
340 $this->realfeelmin
= $realfeelmin;
350 public function getRealfeelmin() {
351 return $this->realfeelmin
;
357 * @param integer $realfeelmax
361 public function setRealfeelmax($realfeelmax) {
362 $this->realfeelmax
= $realfeelmax;
372 public function getRealfeelmax() {
373 return $this->realfeelmax
;
379 * @param integer $temperature
383 public function setTemperature($temperature) {
384 $this->temperature
= $temperature;
394 public function getTemperature() {
395 return $this->temperature
;
401 * @param integer $temperaturemin
405 public function setTemperaturemin($temperaturemin) {
406 $this->temperaturemin
= $temperaturemin;
416 public function getTemperaturemin() {
417 return $this->temperaturemin
;
423 * @param integer $temperaturemax
427 public function setTemperaturemax($temperaturemax) {
428 $this->temperaturemax
= $temperaturemax;
438 public function getTemperaturemax() {
439 return $this->temperaturemax
;
445 * @param \DateTime $locked
449 public function setLocked($locked) {
450 $this->locked
= $locked;
460 public function getLocked() {
461 return $this->locked
;
467 * @param \DateTime $created
471 public function setCreated($created) {
472 $this->created
= $created;
482 public function getCreated() {
483 return $this->created
;
489 * @param \DateTime $updated
493 public function setUpdated($updated) {
494 $this->updated
= $updated;
504 public function getUpdated() {
505 return $this->updated
;
511 * @param \Rapsys\AirBundle\Entity\Application $application
515 public function addApplication(\Rapsys\AirBundle\Entity\Application
$application) {
516 $this->applications
[] = $application;
524 * @param \Rapsys\AirBundle\Entity\Application $application
526 public function removeApplication(\Rapsys\AirBundle\Entity\Application
$application) {
527 $this->applications
->removeElement($application);
533 * @return \Doctrine\Common\Collections\Collection
535 public function getApplications() {
536 return $this->applications
;
542 * @param \Rapsys\AirBundle\Entity\Location $location
546 public function setLocation(\Rapsys\AirBundle\Entity\Location
$location = null) {
547 $this->location
= $location;
555 * @return \Rapsys\AirBundle\Entity\Location
557 public function getLocation() {
558 return $this->location
;
564 * @param \Rapsys\AirBundle\Entity\Slot $slot
568 public function setSlot(\Rapsys\AirBundle\Entity\Slot
$slot = null) {
577 * @return \Rapsys\AirBundle\Entity\Slot
579 public function getSlot() {
586 * @param \Rapsys\AirBundle\Entity\Application $application
590 public function setApplication(\Rapsys\AirBundle\Entity\Application
$application = null) {
591 $this->application
= $application;
599 * @return \Rapsys\AirBundle\Entity\Application
601 public function getApplication() {
602 return $this->application
;