Skip to content

Commit 4f810ac

Browse files
committed
docs: move note to appropriate place
1 parent 03c536f commit 4f810ac

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ one argument named ``$page``. It also has an ``index()`` method, the same
6060
as the default controller found in **app/Controllers/Home.php**; that method
6161
displays the CodeIgniter welcome page.
6262

63+
.. note:: There are two ``view()`` functions referred to in this tutorial.
64+
One is the class method created with ``public function view($page = 'home')``
65+
and ``echo view('welcome_message')`` for displaying a view.
66+
Both are *technically* a function. But when you create a function in a class,
67+
it's called a method.
68+
6369
The ``Pages`` class is extending the
6470
``CodeIgniter\Controller`` class. This means that the new Pages class can access the
6571
methods and variables defined in the ``CodeIgniter\Controller`` class
@@ -103,12 +109,6 @@ includes the following code:
103109
function. It's a global function provided by CodeIgniter to help prevent
104110
XSS attacks. You can read more about it :doc:`here </general/common_functions>`.
105111

106-
.. warning:: There are two **view()** functions referred to in this tutorial.
107-
One is the class method created with ``public function view($page = 'home')``
108-
and ``echo view('welcome_message');`` for displaying a view.
109-
Both are *technically* a function. But when you create a function in a class,
110-
it's called a method.
111-
112112
Adding logic to the controller
113113
-------------------------------------------------------
114114

0 commit comments

Comments
 (0)