1 | <?php namespace Anomaly\Streams\Platform\Routing; |
||
17 | class UrlGenerator extends \Illuminate\Routing\UrlGenerator |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * The parser engine. |
||
22 | * |
||
23 | * @var Engine |
||
24 | */ |
||
25 | protected $parser; |
||
26 | |||
27 | /** |
||
28 | * Create a new UrlGenerator instance. |
||
29 | * |
||
30 | * @param RouteCollection $routes |
||
31 | * @param Request $request |
||
32 | */ |
||
33 | public function __construct(RouteCollection $routes, Request $request) |
||
43 | |||
44 | /** |
||
45 | * Generate an absolute URL to the given asset. |
||
46 | * |
||
47 | * @param $path |
||
48 | * @param null $locale |
||
49 | * @param mixed $extra |
||
50 | * @param bool|null $secure |
||
51 | * @return string |
||
52 | */ |
||
53 | public function locale($path, $locale = null, $extra = [], $secure = null) |
||
61 | |||
62 | /** |
||
63 | * Generate an absolute URL to the given asset. |
||
64 | * |
||
65 | * @param string $asset |
||
66 | * @param mixed $extra |
||
67 | * @param bool|null $secure |
||
68 | * @return string |
||
69 | */ |
||
70 | public function asset($asset, $extra = [], $secure = null) |
||
103 | |||
104 | /** |
||
105 | * Make a route path. |
||
106 | * |
||
107 | * @param $name |
||
108 | * @param $entry |
||
109 | * @param array $parameters |
||
110 | * @return mixed|null|string |
||
111 | */ |
||
112 | public function make($name, $entry, array $parameters = []) |
||
137 | |||
138 | /** |
||
139 | * Get the URL to a named route. |
||
140 | * |
||
141 | * @param string $name |
||
142 | * @param mixed $parameters |
||
143 | * @param bool $absolute |
||
144 | * @return string |
||
145 | * |
||
146 | * @throws \InvalidArgumentException |
||
147 | */ |
||
148 | public function route($name, $parameters = [], $absolute = true) |
||
162 | |||
163 | /** |
||
164 | * Return if the route exists. |
||
165 | * |
||
166 | * @param $name |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function hasRoute($name) |
||
173 | } |
||
174 |