Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
2904a7a9
Commit
2904a7a9
authored
Jan 10, 2013
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[docs] Inject $app to showcase that possibility
parent
8ac1c044
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
doc/usage.rst
doc/usage.rst
+2
-1
No files found.
doc/usage.rst
View file @
2904a7a9
...
@@ -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
)
{
{
...
...
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment