Permalink
Browse files

Use addPrefix to avoid deprecated calls in >2.2.0

  • Loading branch information...
1 parent 9705ba7 commit 36b879b339bc5086b3c8cc188b7725299d73e1fe @davedevelopment davedevelopment committed Mar 7, 2013
Showing with 4 additions and 2 deletions.
  1. +2 −2 src/Silex/Application.php
  2. +2 −0 src/Silex/ControllerCollection.php
@@ -364,7 +364,7 @@ public function error($callback, $priority = -8)
*/
public function flush($prefix = '')
{
- $this['routes']->addCollection($this['controllers']->flush($prefix), $prefix);
+ $this['routes']->addCollection($this['controllers']->flush($prefix));
}
/**
@@ -462,7 +462,7 @@ public function mount($prefix, $controllers)
throw new \LogicException('The "mount" method takes either a ControllerCollection or a ControllerProviderInterface instance.');
}
- $this['routes']->addCollection($controllers->flush($prefix), $prefix);
+ $this['routes']->addCollection($controllers->flush($prefix));
return $this;
}
@@ -148,6 +148,8 @@ public function flush($prefix = '')
$controller->freeze();
}
+ $routes->addPrefix($prefix);
+
$this->controllers = array();
return $routes;

0 comments on commit 36b879b

Please sign in to comment.