Total Complexity | 6 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
13 | trait FileTrait |
||
14 | { |
||
15 | /** |
||
16 | * We are not asserting this is a file here because it may be a string for dynamic component e.g. {{ filePath }} |
||
17 | * validation constraint could be made perhaps to validate a file or a variable |
||
18 | * @ORM\Column(type="string", nullable=false) |
||
19 | * @Groups({"component", "content"}) |
||
20 | * @ApiProperty(iri="http://schema.org/contentUrl") |
||
21 | * @var null|string |
||
22 | */ |
||
23 | protected $filePath; |
||
24 | |||
25 | /** |
||
26 | * @Groups({"component", "content"}) |
||
27 | * @var FileData|null |
||
28 | */ |
||
29 | private $fileData; |
||
30 | |||
31 | /** |
||
32 | * @return null|string |
||
33 | */ |
||
34 | public function getFilePath(): ?string |
||
35 | { |
||
36 | return $this->filePath; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param null|string $filePath |
||
41 | */ |
||
42 | public function setFilePath(?string $filePath): void |
||
43 | { |
||
44 | $this->filePath = $filePath; |
||
45 | } |
||
46 | |||
47 | public static function getImagineFilters(): array |
||
53 | ]; |
||
54 | } |
||
55 | |||
56 | public function getDir(): ?string |
||
57 | { |
||
58 | return null; |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * @return null|FileData |
||
63 | */ |
||
64 | public function getFileData(): ?FileData |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @param null|FileData $fileData |
||
71 | */ |
||
72 | public function setFileData(?FileData $fileData): void |
||
77 |