Permalink
Browse files

its no longer possible to have duplicate route names

  • Loading branch information...
1 parent bb32554 commit 87029aeb8ea63ee372b952c545905eb8d6efd38f @lsmith77 lsmith77 committed Aug 8, 2012
Showing with 0 additions and 17 deletions.
  1. +0 −4 Routing/Loader/Reader/RestActionReader.php
  2. +0 −13 Routing/RestRouteCollection.php
@@ -184,10 +184,6 @@ public function read(RestRouteCollection $collection, \ReflectionMethod $method,
// generated parameters
$routeName = $this->namePrefix.strtolower($routeName);
- if ($collection->has($routeName)) {
- throw new \InvalidArgumentException("Another method before '{$method->getName()}' already defined route also named '$routeName'");
- }
-
$pattern = implode('/', $urlParts);
$defaults = array('_controller' => $method->getName());
$requirements = array('_method' => strtoupper($httpMethod));
@@ -23,19 +23,6 @@ class RestRouteCollection extends RouteCollection
private $singularName;
/**
- * Checks if there is already a route by the same name in the collection.
- *
- * @param string $name The route name
- *
- * @api
- */
- public function has($name)
- {
- $routes = $this->all();
- return isset($routes[$name]);
- }
-
- /**
* Set collection singular name.
*
* @param string $name Singular name

0 comments on commit 87029ae

Please sign in to comment.