@@ -35,7 +35,7 @@ your autoloader to load the Routing component::
35
35
use Symfony\Component\Routing\RouteCollection;
36
36
use Symfony\Component\Routing\Route;
37
37
38
- $route = new Route('/foo', array('controller ' => 'MyController'));
38
+ $route = new Route('/foo', array('_controller ' => 'MyController'));
39
39
$routes = new RouteCollection();
40
40
$routes->add('route_name', $route);
41
41
@@ -44,7 +44,7 @@ your autoloader to load the Routing component::
44
44
$matcher = new UrlMatcher($routes, $context);
45
45
46
46
$parameters = $matcher->match('/foo');
47
- // array('controller ' => 'MyController', '_route' => 'route_name')
47
+ // array('_controller ' => 'MyController', '_route' => 'route_name')
48
48
49
49
.. note ::
50
50
@@ -102,7 +102,7 @@ Take the following route, which combines several of these ideas::
102
102
103
103
$route = new Route(
104
104
'/archive/{month}', // path
105
- array('controller ' => 'showArchive'), // default values
105
+ array('_controller ' => 'showArchive'), // default values
106
106
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107
107
array(), // options
108
108
'{subdomain}.example.com', // host
@@ -114,7 +114,7 @@ Take the following route, which combines several of these ideas::
114
114
115
115
$parameters = $matcher->match('/archive/2012-01');
116
116
// array(
117
- // 'controller ' => 'showArchive',
117
+ // '_controller ' => 'showArchive',
118
118
// 'month' => '2012-01',
119
119
// 'subdomain' => 'www',
120
120
// '_route' => ...
@@ -279,7 +279,7 @@ have to provide the name of a PHP file which returns a :class:`Symfony\\Componen
279
279
$collection = new RouteCollection();
280
280
$collection->add(
281
281
'route_name',
282
- new Route('/foo', array('controller ' => 'ExampleController'))
282
+ new Route('/foo', array('_controller ' => 'ExampleController'))
283
283
);
284
284
// ...
285
285
0 commit comments