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
47769119
Commit
47769119
authored
Jun 19, 2012
by
Romain Neutron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ControllerProvider example to use the controllers factory
parent
3be840d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
doc/providers.rst
doc/providers.rst
+2
-1
No files found.
doc/providers.rst
View file @
47769119
...
@@ -170,7 +170,8 @@ Here is an example of such a provider::
...
@@ -170,7 +170,8 @@ Here is an example of such a provider::
{
{
public function connect(Application $app)
public function connect(Application $app)
{
{
$controllers = new ControllerCollection();
// creates a new controller based on the default route
$controllers = $app['controllers_factory'];
$controllers->get('/', function (Application $app) {
$controllers->get('/', function (Application $app) {
return $app->redirect('/hello');
return $app->redirect('/hello');
...
...
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