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 | 74 | public function __construct(UrlGenerator $generator) |
|
38 | |||
39 | 42 | public function get(): string |
|
51 | |||
52 | 43 | public function set(string $url): self |
|
58 | |||
59 | 9 | public function setCustomRoot(Root $root) |
|
65 | |||
66 | 41 | public function localize(string $localeSegment = null, array $available_locales): self |
|
73 | |||
74 | 8 | public function parameters(array $parameters = []): self |
|
80 | |||
81 | 32 | public function secure($secure = true): self |
|
87 | |||
88 | 74 | private function rootFromApplication(): Url |
|
92 | |||
93 | /** |
||
94 | * Resolve the route via the Illuminate UrlGenerator. |
||
95 | * |
||
96 | * @param $routekey |
||
97 | * @param array $parameters |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 27 | public function resolveRoute($routekey, $parameters = []) |
|
105 | } |
||
106 |