Skip to content

Commit

Permalink
Pass $app to group() so invokable classes can be used
Browse files Browse the repository at this point in the history
This ports #2229 to 3.x.
  • Loading branch information
akrabat committed Sep 21, 2017
1 parent 403b798 commit 14e15f9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions Slim/RouteGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct($pattern, $callable)
/**
* Invoke the group to register any Routable objects within it.
*
* @param App $app The App to bind the callable to.
* @param App $app The App instance to bind/pass to the group callable
*/
public function __invoke(App $app = null)
{
Expand All @@ -42,6 +42,6 @@ public function __invoke(App $app = null)
$callable = $callable->bindTo($app);
}

$callable();
$callable($app);
}
}
Loading

0 comments on commit 14e15f9

Please sign in to comment.