| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class XetaravelPathGenerator implements PathGenerator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Get the path for the given media, relative to the root storage path. |
||
| 14 | * |
||
| 15 | * @param Media $media |
||
| 16 | * |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | public function getPath(Media $media): string |
||
| 20 | { |
||
| 21 | return $media->collection_name . '/' . $media->id . '/'; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get the path for conversions of the given media, relative to the root storage path. |
||
| 26 | * |
||
| 27 | * @param Media $media |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function getPathForConversions(Media $media): string |
||
| 32 | { |
||
| 33 | return $this->getPath($media) . 'conversions/'; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get the path for responsive images of the given media, relative to the root storage path. |
||
| 38 | * |
||
| 39 | * @param Media $media |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getPathForResponsiveImages(Media $media): string |
||
| 46 | } |
||
| 47 | } |
||
| 48 |