File tree Expand file tree Collapse file tree
user_guide_src/source/tutorial Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ one argument named ``$page``. It also has an ``index()`` method, the same
6060as the default controller found in **app/Controllers/Home.php **; that method
6161displays 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+
6369The ``Pages `` class is extending the
6470``CodeIgniter\Controller `` class. This means that the new Pages class can access the
6571methods 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-
112112Adding logic to the controller
113113-------------------------------------------------------
114114
You can’t perform that action at this time.
0 commit comments