]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Session.php
Optionalize all fields
[airbundle] / Entity / Session.php
index fb0b8f3cc21a47c04a691622c6b7965a7e184711..084580e6af8debfbcd0dd6a0f63f31911a315352 100644 (file)
@@ -132,10 +132,12 @@ class Session {
         * Constructor
         */
        public function __construct() {
         * Constructor
         */
        public function __construct() {
+               //Set defaults
                $this->begin = null;
                $this->start = null;
                $this->length = null;
                $this->stop = null;
                $this->begin = null;
                $this->start = null;
                $this->length = null;
                $this->stop = null;
+               $this->premium = null;
                $this->rainfall = null;
                $this->rainrisk = null;
                $this->realfeel = null;
                $this->rainfall = null;
                $this->rainrisk = null;
                $this->realfeel = null;
@@ -145,7 +147,8 @@ class Session {
                $this->temperaturemin = null;
                $this->temperaturemax = null;
                $this->locked = null;
                $this->temperaturemin = null;
                $this->temperaturemax = null;
                $this->locked = null;
-               $this->premium = null;
+               $this->created = new \DateTime('now');
+               $this->updated = new \DateTime('now');
                $this->applications = new ArrayCollection();
        }
 
                $this->applications = new ArrayCollection();
        }