@@ -170,8 +170,8 @@ public function getRouteCollection()
170
170
* Returns an array of parameter like this
171
171
*
172
172
* array(
173
- * "_controller" => "NameSpace\Controller::indexAction",
174
- * "_content" => $document,
173
+ * RouteObjectInterface::CONTROLLER_NAME => "NameSpace\Controller::indexAction",
174
+ * RouteObjectInterface::CONTENT_OBJECT => $document,
175
175
* )
176
176
*
177
177
* The controller can be either the fully qualified class name or the
@@ -184,7 +184,8 @@ public function getRouteCollection()
184
184
* @return array as described above
185
185
*
186
186
* @throws ResourceNotFoundException If the requested url does not exist in the ODM
187
- * @throws MethodNotAllowedException If the resource was found but the request method is not allowed
187
+ * @throws \Symfony\Component\Routing\Exception\MethodNotAllowedException
188
+ * If the resource was found but the request method is not allowed
188
189
*/
189
190
public function match ($ url )
190
191
{
@@ -200,7 +201,7 @@ public function match($url)
200
201
201
202
$ route = $ collection ->get ($ defaults ['_route ' ]);
202
203
203
- if (empty ($ defaults [' _controller ' ])) {
204
+ if (empty ($ defaults [RouteObjectInterface:: CONTROLLER_NAME ])) {
204
205
// if content does not provide explicit controller, try to find it with one of the mappers
205
206
$ controller = false ;
206
207
foreach ($ this ->mappers as $ mapper ) {
@@ -214,7 +215,7 @@ public function match($url)
214
215
throw new ResourceNotFoundException ("The mapper was not able to determine a controller for ' $ url' " );;
215
216
}
216
217
217
- $ defaults [' _controller ' ] = $ controller ;
218
+ $ defaults [RouteObjectInterface:: CONTROLLER_NAME ] = $ controller ;
218
219
}
219
220
220
221
if ($ route instanceof RouteObjectInterface && $ content = $ route ->getRouteContent ()) {
@@ -230,7 +231,7 @@ public function match($url)
230
231
*
231
232
* @param RouteCollection $collection collection of routes for the current request
232
233
*
233
- * @return UrlMatcherInterface the url matcher instance
234
+ * @return \Symfony\Component\Routing\Matcher\ UrlMatcherInterface the url matcher instance
234
235
*/
235
236
public function getMatcher (RouteCollection $ collection )
236
237
{
0 commit comments