src/Controller/AbstractController.php 1 location
|
@@ 200-207 (lines=8) @@
|
| 197 |
|
$routes = array_merge($routes, $apiRoutes); |
| 198 |
|
$path = ''; |
| 199 |
|
|
| 200 |
|
foreach ($routes as $routeName => $data) { |
| 201 |
|
|
| 202 |
|
if ($routeName === $name) { |
| 203 |
|
$path = preg_replace('|/\((.*)\)|', '', $data['path']); |
| 204 |
|
break; |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
if (empty($path)) { |
| 210 |
|
|
src/View/Helper/Route.php 1 location
|
@@ 45-52 (lines=8) @@
|
| 42 |
|
|
| 43 |
|
$path = ''; |
| 44 |
|
|
| 45 |
|
foreach ($routes as $routeName => $data) { |
| 46 |
|
|
| 47 |
|
if ($routeName === $name) { |
| 48 |
|
$path = preg_replace('|/\((.*)\)|', '', $data['path']); |
| 49 |
|
break; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
if (empty($path)) { |
| 55 |
|
throw new RouteInvalidException('No route for name "' . $name . '" found'); |