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
;
51 * @var \Rapsys\AirBundle\Entity\Session
56 * @var \Rapsys\AirBundle\Entity\User
63 public function __construct() {
64 $this->session
= null;
73 public function getId(): int {
84 public function setDance(Dance
$dance): Session
{
85 $this->dance
= $dance;
95 public function getDance(): Dance
{
102 * @param float $score
104 * @return Application
106 public function setScore(?float $score): Application
{
107 $this->score
= $score;
117 public function getScore(): ?float {
124 * @param \DateTime $canceled
126 * @return Application
128 public function setCanceled(?\DateTime
$canceled): Application
{
129 $this->canceled
= $canceled;
139 public function getCanceled(): ?\DateTime
{
140 return $this->canceled
;
146 * @param \DateTime $created
148 * @return Application
150 public function setCreated(\DateTime
$created): Application
{
151 $this->created
= $created;
161 public function getCreated(): \DateTime
{
162 return $this->created
;
168 * @param \DateTime $updated
170 * @return Application
172 public function setUpdated(\DateTime
$updated): Application
{
173 $this->updated
= $updated;
183 public function getUpdated(): \DateTime
{
184 return $this->updated
;
190 * @param Session $session
192 * @return Application
194 public function setSession(Session
$session): Application
{
195 $this->session
= $session;
205 public function getSession(): Session
{
206 return $this->session
;
214 * @return Application
216 public function setUser(User
$user): Application
{
227 public function getUser(): User
{
234 public function preUpdate(PreUpdateEventArgs
$eventArgs) {
235 //Check that we have an application instance
236 if (($application = $eventArgs->getEntity()) instanceof Application
) {
238 $application->setUpdated(new \
DateTime('now'));