Deprecated: Constant E_STRICT is deprecated in /home/normanv/www/annuairepro/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /home/normanv/www/annuairepro/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/vich/uploader-bundle/src/Mapping/Annotation/UploadableField.php line 56

Open in your IDE?
  1. <?php
  2. namespace Vich\UploaderBundle\Mapping\Annotation;
  3. use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
  4. use Vich\UploaderBundle\Mapping\AnnotationInterface;
  5. /**
  6.  * UploadableField.
  7.  *
  8.  * @Annotation
  9.  * @Target({"PROPERTY"})
  10.  * @NamedArgumentConstructor
  11.  *
  12.  * @author Dustin Dobervich <ddobervich@gmail.com>
  13.  * @final
  14.  */
  15. #[\Attribute(\Attribute::TARGET_PROPERTY)]
  16. class UploadableField implements AnnotationInterface
  17. {
  18.     /**
  19.      * @var string
  20.      */
  21.     protected $mapping;
  22.     /**
  23.      * @var string
  24.      */
  25.     protected $fileNameProperty;
  26.     //TODO: replace "fileNameProperty" with just "name"
  27.     /**
  28.      * @var string
  29.      */
  30.     protected $size;
  31.     /**
  32.      * @var string
  33.      */
  34.     protected $mimeType;
  35.     /**
  36.      * @var string
  37.      */
  38.     protected $originalName;
  39.     /**
  40.      * @var string
  41.      */
  42.     protected $dimensions;
  43.     /**
  44.      * Constructs a new instance of UploadableField.
  45.      */
  46.     public function __construct(
  47.         string $mapping,
  48.         string $fileNameProperty null,
  49.         string $size null,
  50.         string $mimeType null,
  51.         string $originalName null,
  52.         string $dimensions null
  53.     ) {
  54.         $this->mapping $mapping;
  55.         $this->fileNameProperty $fileNameProperty;
  56.         $this->size $size;
  57.         $this->mimeType $mimeType;
  58.         $this->originalName $originalName;
  59.         $this->dimensions $dimensions;
  60.     }
  61.     /**
  62.      * Gets the mapping name.
  63.      *
  64.      * @return string The mapping name
  65.      */
  66.     public function getMapping(): string
  67.     {
  68.         return $this->mapping;
  69.     }
  70.     /**
  71.      * Gets the file name property.
  72.      *
  73.      * @return string|null The file name property
  74.      */
  75.     public function getFileNameProperty(): ?string
  76.     {
  77.         return $this->fileNameProperty;
  78.     }
  79.     public function getSize(): ?string
  80.     {
  81.         return $this->size;
  82.     }
  83.     public function getMimeType(): ?string
  84.     {
  85.         return $this->mimeType;
  86.     }
  87.     public function getOriginalName(): ?string
  88.     {
  89.         return $this->originalName;
  90.     }
  91.     public function getDimensions(): ?string
  92.     {
  93.         return $this->dimensions;
  94.     }
  95. }