Commit ad64fadc authored by Fabien Potencier's avatar Fabien Potencier

feature #1206 removed flush() argument (fabpot)

This PR was merged into the 2.0.x-dev branch.

Discussion
----------

removed flush() argument

I propose to remove the `flush()` prefix argument as I don't see any use case. I think it was there because the method is recursive, but that's leaking an implementation detail. Passing a prefix was not documented.

Commits
-------

4005cf28 removed flush() argument
parents e98dd5f7 4005cf28
......@@ -399,12 +399,10 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
/**
* Flushes the controller collection.
*
* @param string $prefix The route prefix
*/
public function flush($prefix = '')
public function flush()
{
$this['routes']->addCollection($this['controllers']->flush($prefix));
$this['routes']->addCollection($this['controllers']->flush());
}
/**
......
......@@ -182,11 +182,9 @@ class ControllerCollection
/**
* Persists and freezes staged controllers.
*
* @param string $prefix
*
* @return RouteCollection A RouteCollection instance
*/
public function flush($prefix = '')
public function flush()
{
if (null === $this->routesFactory) {
$routes = new RouteCollection();
......@@ -194,7 +192,7 @@ class ControllerCollection
$routes = $this->routesFactory;
}
return $this->doFlush($prefix, $routes);
return $this->doFlush('', $routes);
}
private function doFlush($prefix, RouteCollection $routes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment