bytic /
MediaLibrary
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ByTIC\MediaLibrary\Collections\UploadStrategy; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Class OriginalNameStrategy. |
||
| 7 | */ |
||
| 8 | class OriginalNameStrategy extends AbstractStrategy |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @param $path |
||
| 12 | * @param $extension |
||
| 13 | * |
||
| 14 | * @return string |
||
| 15 | */ |
||
| 16 | 2 | public static function transformFileName($path, $extension) |
|
| 17 | { |
||
| 18 | 2 | $name = pathinfo($path, PATHINFO_FILENAME); |
|
| 19 | |||
| 20 | 2 | return $name . '.' . $extension; |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 21 | } |
||
| 22 | } |
||
| 23 |