Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Routing; |
| 4 | |
| 5 | interface UrlGenerator |
| 6 | { |
| 7 | /** |
| 8 | * Get the current URL for the request. |
| 9 | * |
| 10 | * @return string |
| 11 | */ |
| 12 | public function current(); |
| 13 | |
| 14 | /** |
| 15 | * Get the URL for the previous request. |
| 16 | * |
| 17 | * @param mixed $fallback |
| 18 | * @return string |
| 19 | */ |
| 20 | public function previous($fallback = false); |
| 21 | |
| 22 | /** |
| 23 | * Generate an absolute URL to the given path. |
| 24 | * |
| 25 | * @param string $path |
| 26 | * @param mixed $extra |
| 27 | * @param bool|null $secure |
| 28 | * @return string |
| 29 | */ |
| 30 | public function to($path, $extra = [], $secure = null); |
| 31 | |
| 32 | /** |
| 33 | * Generate a secure, absolute URL to the given path. |
| 34 | * |
| 35 | * @param string $path |
| 36 | * @param array $parameters |
| 37 | * @return string |
| 38 | */ |
| 39 | public function secure($path, $parameters = []); |
| 40 | |
| 41 | /** |
| 42 | * Generate the URL to an application asset. |
| 43 | * |
| 44 | * @param string $path |
| 45 | * @param bool|null $secure |
| 46 | * @return string |
| 47 | */ |
| 48 | public function asset($path, $secure = null); |
| 49 | |
| 50 | /** |
| 51 | * Get the URL to a named route. |
| 52 | * |
| 53 | * @param string $name |
| 54 | * @param mixed $parameters |
| 55 | * @param bool $absolute |
| 56 | * @return string |
| 57 | * |
| 58 | * @throws \InvalidArgumentException |
| 59 | */ |
| 60 | public function route($name, $parameters = [], $absolute = true); |
| 61 | |
| 62 | /** |
| 63 | * Get the URL to a controller action. |
| 64 | * |
| 65 | * @param string|array $action |
| 66 | * @param mixed $parameters |
| 67 | * @param bool $absolute |
| 68 | * @return string |
| 69 | */ |
| 70 | public function action($action, $parameters = [], $absolute = true); |
| 71 | |
| 72 | /** |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 73 | * Get the root controller namespace. |
| 74 | * |
| 75 | * @return string |
| 76 | */ |
| 77 | public function getRootControllerNamespace(); |
| 78 | |
| 79 | /** |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 80 | * Set the root controller namespace. |
| 81 | * |
| 82 | * @param string $rootNamespace |
| 83 | * @return $this |
| 84 | */ |
| 85 | public function setRootControllerNamespace($rootNamespace); |
| 86 | } |