src/Entity/Media/Image.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3.  * Unauthorized copying of this file, via any medium is strictly prohibited
  4.  * Proprietary and confidential.
  5.  *
  6.  * @author Bilel AZRI          <azri.bilel@gmail.com>
  7.  * @author Assma BEN SASSI     <bensassiasma.bws@gmail.com>
  8.  *
  9.  * Bicking man (c) 2019-present.
  10.  */
  11. declare(strict_types=1);
  12. namespace App\Entity\Media;
  13. use App\Behavior\Uuidable;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Symfony\Component\Serializer\Annotation\Groups;
  16. /**
  17.  * @ORM\Entity
  18.  * @ORM\HasLifecycleCallbacks
  19.  */
  20. class Image extends Media
  21. {
  22.     
  23.     use Uuidable;
  24.     /** @var string */
  25.     public $discr 'image';
  26.    
  27.     /**
  28.      * @Groups({"image:read"})
  29.      * @ORM\Column(type="float", nullable=true)
  30.      */
  31.     protected $width;
  32.     /**
  33.      * @Groups({"image:read"})
  34.      * @ORM\Column(type="float", nullable=true)
  35.      */
  36.     protected $height;
  37.     public function getWidth(): ?float
  38.     {
  39.         return $this->width;
  40.     }
  41.     public function setWidth(?float $width): self
  42.     {
  43.         $this->width $width;
  44.         return $this;
  45.     }
  46.     public function getHeight(): ?float
  47.     {
  48.         return $this->height;
  49.     }
  50.     public function setHeight(?float $height): self
  51.     {
  52.         $this->height $height;
  53.         return $this;
  54.     }
  55.     public function getDiscr(): string
  56.     {
  57.         return $this->discr;
  58.     }
  59. }