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 | 62 | public function __construct(UrlGenerator $generator) |
|
38 | |||
39 | 52 | public function get(): string |
|
47 | |||
48 | 52 | public function set(string $url): self |
|
54 | |||
55 | 8 | public function setCustomRoot(Root $root) |
|
61 | |||
62 | 50 | public function localize(string $localeSegment = null, array $available_locales): self |
|
69 | |||
70 | 10 | public function parameters(array $parameters = []): self |
|
76 | |||
77 | 40 | public function secure($secure = true): self |
|
83 | |||
84 | 62 | private function rootFromApplication(): Url |
|
88 | |||
89 | /** |
||
90 | * Resolve the route via the Illuminate UrlGenerator. |
||
91 | |||
92 | * @param $routekey |
||
93 | * @param array $parameters |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | 32 | public function resolveRoute($routekey, $parameters = []) |
|
101 | } |
||
102 |