1 | <?php |
||
15 | final class Filename |
||
16 | { |
||
17 | private function __construct() { } |
||
18 | |||
19 | /** |
||
20 | * Sanitize filename. |
||
21 | * |
||
22 | * @param string $filename Filename to sanitize. |
||
23 | * @return string Sanitized filename |
||
24 | */ |
||
25 | public static function sanitize($filename) |
||
33 | |||
34 | /** |
||
35 | * Create unique temporary file with given filename in system's temporary directory. |
||
36 | * |
||
37 | * @param string $filename Filename of temporary file. |
||
38 | * @return string Absolute path to created temporary file. |
||
39 | */ |
||
40 | public static function temporaryFile($filename) |
||
50 | |||
51 | /** |
||
52 | * Create temporary filename with given filename with path in system's temporary directory. |
||
53 | * |
||
54 | * @param string $filename Filename of temporary file. |
||
55 | * @return string Generated absolute path to unique temporary file. |
||
56 | */ |
||
57 | public static function temporaryFilename($filename) |
||
67 | } |
||
68 |