Skip to content

Commit eb1930a

Browse files
committed
docs: replace (:any) with (:segment)
Since the controller is not implemented to handle multiple parameters, (:segment) is appropriate here.
1 parent 0fbc883 commit eb1930a

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

user_guide_src/source/tutorial/create_news_items/004.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
$routes->get('news/(:segment)', 'News::view/$1');
77
$routes->get('news', 'News::index');
88
$routes->get('pages', 'Pages::index');
9-
$routes->get('(:any)', 'Pages::view/$1');
9+
$routes->get('(:segment)', 'Pages::view/$1');
1010

1111
// ...

user_guide_src/source/tutorial/news_section/008.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
$routes->get('news/(:segment)', 'News::view/$1');
66
$routes->get('news', 'News::index');
77
$routes->get('pages', 'Pages::index');
8-
$routes->get('(:any)', 'Pages::view/$1');
8+
$routes->get('(:segment)', 'Pages::view/$1');
99

1010
// ...

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ More information about routing can be found in the URI Routing
151151
Here, the second rule in the ``$routes`` object matches GET request
152152
to the URI path ``/pages`` maps the ``index()`` method of the ``Pages`` class.
153153

154-
The third rule in the ``$routes`` object matches GET request to **any** URI path
155-
using the wildcard string ``(:any)``, and passes the parameter to the
154+
The third rule in the ``$routes`` object matches a GET request to a URI segment
155+
using the placeholder ``(:segment)``, and passes the parameter to the
156156
``view()`` method of the ``Pages`` class.
157157

158158
Running the App
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
22

33
$routes->get('pages', 'Pages::index');
4-
$routes->get('(:any)', 'Pages::view/$1');
4+
$routes->get('(:segment)', 'Pages::view/$1');

0 commit comments

Comments
 (0)