@@ -170,8 +170,8 @@ public function getRouteCollection()
170170 * Returns an array of parameter like this
171171 *
172172 * array(
173- * "_controller" => "NameSpace\Controller::indexAction",
174- * "_content" => $document,
173+ * RouteObjectInterface::CONTROLLER_NAME => "NameSpace\Controller::indexAction",
174+ * RouteObjectInterface::CONTENT_OBJECT => $document,
175175 * )
176176 *
177177 * The controller can be either the fully qualified class name or the
@@ -184,7 +184,8 @@ public function getRouteCollection()
184184 * @return array as described above
185185 *
186186 * @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
188189 */
189190 public function match ($ url )
190191 {
@@ -200,7 +201,7 @@ public function match($url)
200201
201202 $ route = $ collection ->get ($ defaults ['_route ' ]);
202203
203- if (empty ($ defaults [' _controller ' ])) {
204+ if (empty ($ defaults [RouteObjectInterface:: CONTROLLER_NAME ])) {
204205 // if content does not provide explicit controller, try to find it with one of the mappers
205206 $ controller = false ;
206207 foreach ($ this ->mappers as $ mapper ) {
@@ -214,7 +215,7 @@ public function match($url)
214215 throw new ResourceNotFoundException ("The mapper was not able to determine a controller for ' $ url' " );;
215216 }
216217
217- $ defaults [' _controller ' ] = $ controller ;
218+ $ defaults [RouteObjectInterface:: CONTROLLER_NAME ] = $ controller ;
218219 }
219220
220221 if ($ route instanceof RouteObjectInterface && $ content = $ route ->getRouteContent ()) {
@@ -230,7 +231,7 @@ public function match($url)
230231 *
231232 * @param RouteCollection $collection collection of routes for the current request
232233 *
233- * @return UrlMatcherInterface the url matcher instance
234+ * @return \Symfony\Component\Routing\Matcher\ UrlMatcherInterface the url matcher instance
234235 */
235236 public function getMatcher (RouteCollection $ collection )
236237 {
0 commit comments