src/App/Shared/Domain/File/File.php line 44

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Shared\Domain\File;
  4. use Symfony\Component\HttpFoundation\File\File as BaseFile;
  5. final class File extends BaseFile implements \ArrayAccess
  6. {
  7.     public function __construct(
  8.         private string $originalFilename,
  9.         private string $path,
  10.         private string $mimeType
  11.     ) {
  12.         parent::__construct($path);
  13.     }
  14.     public function upload(FileUploaderInterface $fileUploader) : void
  15.     {
  16.         $this->path $fileUploader->upload($this);
  17.     }
  18.     public function getClientOriginalName() : string
  19.     {
  20.         return $this->originalFilename;
  21.     }
  22.     public function getPath() : ?string
  23.     {
  24.         return $this->path;
  25.     }
  26.     public function getOriginalFilename() : string
  27.     {
  28.         return $this->originalFilename;
  29.     }
  30.     public function getMimeType() : string
  31.     {
  32.         return $this->mimeType;
  33.     }
  34.     public function offsetExists($offset)
  35.     {
  36.         // TODO: Implement offsetExists() method.
  37.     }
  38.     public function offsetGet($offset)
  39.     {
  40.         // TODO: Implement offsetGet() method.
  41.     }
  42.     public function offsetSet($offset$value)
  43.     {
  44.         // TODO: Implement offsetSet() method.
  45.     }
  46.     public function offsetUnset($offset)
  47.     {
  48.         // TODO: Implement offsetUnset() method.
  49.     }
  50. }