| 1 | <?php |
||
| 11 | class Helpers |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * helper function to fix paths '//' or '/./' or '/foo/../' in a path. |
||
| 15 | * |
||
| 16 | * @param string $path Path to resolve |
||
| 17 | * |
||
| 18 | * @return string |
||
| 19 | */ |
||
| 20 | public static function fixPath($path) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Join several pieces into a path. |
||
| 34 | * |
||
| 35 | * @param string |
||
| 36 | * ... |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public static function joinPath() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Check whether a request is or not ajax. |
||
| 47 | * |
||
| 48 | * @param RequestInterface $request |
||
| 49 | * |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public static function isAjax(RequestInterface $request) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Check whether a response is a redirection |
||
| 59 | * |
||
| 60 | * @param ResponseInterface $response |
||
| 61 | * |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | public static function isRedirect(ResponseInterface $response) |
||
| 68 | } |
||
| 69 |