Skip to content

Commit 60ebe6c

Browse files
authored
Merge pull request #6961 from kenjis/fix-docs-tutorial-placeholder-any
docs: fix tutorial placeholder `(:any)`
2 parents 305ce77 + aeb3c02 commit 60ebe6c

4 files changed

Lines changed: 7 additions & 7 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ arguments.
148148
More information about routing can be found in the URI Routing
149149
:doc:`documentation </incoming/routing>`.
150150

151-
Here, the second rule in the ``$routes`` object matches GET request
152-
to the URI path ``/pages`` maps the ``index()`` method of the ``Pages`` class.
151+
Here, the second rule in the ``$routes`` object matches a GET request
152+
to the URI path ``/pages``, and it maps to 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)