Commit 2904a7a9 authored by Igor Wiedler's avatar Igor Wiedler

[docs] Inject $app to showcase that possibility

parent 8ac1c044
...@@ -388,13 +388,14 @@ you can tell Silex to lazily create that controller class for you:: ...@@ -388,13 +388,14 @@ you can tell Silex to lazily create that controller class for you::
$app->get('/', 'Igorw\Foo::bar'); $app->get('/', 'Igorw\Foo::bar');
use Silex\Application;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
namespace Igorw namespace Igorw
{ {
class Foo class Foo
{ {
public function bar(Request $request) public function bar(Request $request, Application $app)
{ {
... ...
} }
......
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