1 <?php 
declare(strict_types
=1); 
   4  * this file is part of the rapsys packbundle package. 
   6  * (c) raphaël gertz <symfony@rapsys.eu> 
   8  * for the full copyright and license information, please view the license 
   9  * file that was distributed with this source code. 
  12 namespace Rapsys\AirBundle\Entity
; 
  14 use Doctrine\ORM\Event\PreUpdateEventArgs
; 
  46          * @var \Rapsys\AirBundle\Entity\Session 
  51          * @var \Rapsys\AirBundle\Entity\User 
  58         public function __construct() { 
  59                 $this->session 
= null; 
  68         public function getId(): int { 
  79         public function setScore(?float $score): Application 
{ 
  80                 $this->score 
= $score; 
  90         public function getScore(): ?float { 
  97          * @param \DateTime $canceled 
 101         public function setCanceled(?\DateTime 
$canceled): Application 
{ 
 102                 $this->canceled 
= $canceled; 
 112         public function getCanceled(): ?\DateTime 
{ 
 113                 return $this->canceled
; 
 119          * @param \DateTime $created 
 121          * @return Application 
 123         public function setCreated(\DateTime 
$created): Application 
{ 
 124                 $this->created 
= $created; 
 134         public function getCreated(): \DateTime 
{ 
 135                 return $this->created
; 
 141          * @param \DateTime $updated 
 143          * @return Application 
 145         public function setUpdated(\DateTime 
$updated): Application 
{ 
 146                 $this->updated 
= $updated; 
 156         public function getUpdated(): \DateTime 
{ 
 157                 return $this->updated
; 
 163          * @param Session $session 
 165          * @return Application 
 167         public function setSession(Session 
$session): Application 
{ 
 168                 $this->session 
= $session; 
 178         public function getSession(): Session 
{ 
 179                 return $this->session
; 
 187          * @return Application 
 189         public function setUser(User 
$user): Application 
{ 
 200         public function getUser(): User 
{ 
 207         public function preUpdate(PreUpdateEventArgs 
$eventArgs) { 
 208                 //Check that we have an application instance 
 209                 if (($user = $eventArgs->getEntity()) instanceof Application
) { 
 211                         $user->setUpdated(new \
DateTime('now'));