1 | <?php |
||
9 | class UrlParser |
||
10 | { |
||
11 | /** @var Url */ |
||
12 | private $url; |
||
13 | |||
14 | /** @var string */ |
||
15 | private $localeSegment = null; |
||
16 | |||
17 | /** @var array */ |
||
18 | private $available_locales = []; |
||
19 | |||
20 | /** @var bool */ |
||
21 | private $secure; |
||
22 | |||
23 | /** @var array */ |
||
24 | private $parameters = []; |
||
25 | |||
26 | /** @var UrlGenerator */ |
||
27 | private $generator; |
||
28 | |||
29 | 63 | public function __construct(UrlGenerator $generator) |
|
38 | |||
39 | 37 | public function get(): string |
|
49 | |||
50 | 38 | public function set(string $url): self |
|
56 | |||
57 | 8 | public function setCustomRoot(Root $root) |
|
63 | |||
64 | 36 | public function localize(string $localeSegment = null, array $available_locales): self |
|
71 | |||
72 | 7 | public function parameters(array $parameters = []): self |
|
78 | |||
79 | 28 | public function secure($secure = true): self |
|
85 | |||
86 | 63 | private function rootFromApplication(): Url |
|
90 | |||
91 | /** |
||
92 | * Resolve the route via the Illuminate UrlGenerator. |
||
93 | * |
||
94 | * @param $routekey |
||
95 | * @param array $parameters |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | 23 | public function resolveRoute($routekey, $parameters = []) |
|
103 | } |
||
104 |