| 1 | <?php |
||
| 7 | class FileHelper |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Get first token of string before delimiter |
||
| 11 | * @param $mimetype |
||
| 12 | * @return string |
||
| 13 | */ |
||
| 14 | public static function getTypeByMimetype($mimetype) |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get Font Awesome icon for various files |
||
| 21 | * @param string $mediaType |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public static function getFaIcon($mediaType) |
||
| 35 | |||
| 36 | public static function slug($name) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the extension from the given name |
||
| 48 | * @param $name |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | private static function getExtension($name) |
||
| 55 | } |
||
| 56 |