merged branch Tobion/patch-2 (PR #6048)

This PR was merged into the 2.1 branch.

Commits
-------

ea2bb09 tiny refactoring for consistency

Discussion
----------

tiny refactoring for consistency

no need to use the iterator within the class. not done anywhere else.
This commit is contained in:
Fabien Potencier 2012-11-19 08:43:54 +01:00
commit c4631c5fe6

View File

@ -267,7 +267,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
public function getResources()
{
$resources = $this->resources;
foreach ($this as $routes) {
foreach ($this->routes as $routes) {
if ($routes instanceof RouteCollection) {
$resources = array_merge($resources, $routes->getResources());
}