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
;
33 protected $description;
98 public function __construct() {
99 $this->description
= null;
104 $this->contact
= null;
105 $this->donate
= null;
107 $this->profile
= null;
115 public function getId(): int {
122 * @param string $locale
126 public function setLocale(string $locale): Snippet
{
127 $this->locale
= $locale;
137 public function getLocale(): string {
138 return $this->locale
;
144 * @param string $description
148 public function setDescription(?string $description): Snippet
{
149 $this->description
= $description;
159 public function getDescription(): ?string {
160 return $this->description
;
166 * @param string $class
170 public function setClass(?string $class): Snippet
{
171 $this->class = $class;
181 public function getClass(): ?string {
188 * @param string $short
192 public function setShort(?string $short): Snippet
{
193 $this->short
= $short;
203 public function getShort(): ?string {
214 public function setRate(?int $rate): Snippet
{
225 public function getRate(): ?int {
236 public function setHat(?bool $hat): Snippet
{
247 public function getHat(): ?bool {
253 * @param string $contact
257 public function setContact(?string $contact): Snippet
{
258 $this->contact
= $contact;
268 public function getContact(): ?string {
269 return $this->contact
;
275 * @param string $donate
279 public function setDonate(?string $donate): Snippet
{
280 $this->donate
= $donate;
290 public function getDonate(): ?string {
291 return $this->donate
;
297 * @param string $link
301 public function setLink(?string $link): Snippet
{
312 public function getLink(): ?string {
319 * @param string $profile
323 public function setProfile(?string $profile): Snippet
{
324 $this->profile
= $profile;
334 public function getProfile(): ?string {
335 return $this->profile
;
341 * @param \DateTime $created
345 public function setCreated(\DateTime
$created): Snippet
{
346 $this->created
= $created;
356 public function getCreated(): \DateTime
{
357 return $this->created
;
363 * @param \DateTime $updated
367 public function setUpdated(\DateTime
$updated): Snippet
{
368 $this->updated
= $updated;
378 public function getUpdated(): \DateTime
{
379 return $this->updated
;
385 * @param Location $location
389 public function setLocation(Location
$location) {
390 $this->location
= $location;
400 public function getLocation() {
401 return $this->location
;
411 public function setUser(User
$user) {
422 public function getUser() {
429 public function preUpdate(\Doctrine\ORM\Event\PreUpdateEventArgs
$eventArgs) {
430 //Check that we have an snippet instance
431 if (($snippet = $eventArgs->getEntity()) instanceof Snippet
) {
433 $snippet->setUpdated(new \
DateTime('now'));