Skip to content

Commit 67892c1

Browse files
committed
renamed addRoute to add
1 parent 08f82dc commit 67892c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

quick_tour/the_big_picture.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ So, Symfony2 routes the request by reading the routing configuration file:
149149
use Symfony\Component\Routing\Route;
150150
151151
$collection = new RouteCollection();
152-
$collection->addRoute('homepage', new Route('/', array(
152+
$collection->add('homepage', new Route('/', array(
153153
'_controller' => 'FrameworkBundle:Default:index',
154154
)));
155155
$collection->addCollection($loader->import("HelloBundle/Resources/config/routing.php"));
@@ -190,7 +190,7 @@ part, which imports another routing configuration file that reads as follows:
190190
use Symfony\Component\Routing\Route;
191191
192192
$collection = new RouteCollection();
193-
$collection->addRoute('hello', new Route('/hello/:name', array(
193+
$collection->add('hello', new Route('/hello/:name', array(
194194
'_controller' => 'HelloBundle:Hello:index',
195195
)));
196196

quick_tour/the_controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ a value of ``xml``:
4343
.. code-block:: php
4444
4545
// src/Application/HelloBundle/Resources/config/routing.php
46-
$collection->addRoute('hello', new Route('/hello/:name', array(
46+
$collection->add('hello', new Route('/hello/:name', array(
4747
'_controller' => 'HelloBundle:Hello:index',
4848
'_format' => 'xml',
4949
)));
@@ -84,7 +84,7 @@ action, use the ``:_format`` placeholder in the pattern instead:
8484
.. code-block:: php
8585
8686
// src/Application/HelloBundle/Resources/config/routing.php
87-
$collection->addRoute('hello', new Route('/hello/:name.:_format', array(
87+
$collection->add('hello', new Route('/hello/:name.:_format', array(
8888
'_controller' => 'HelloBundle:Hello:index',
8989
'_format' => 'html',
9090
), array(

0 commit comments

Comments
 (0)