File tree Expand file tree Collapse file tree
user_guide_src/source/incoming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,19 +95,22 @@ The method accepts an array of data to validate in the first parameter:
9595
9696.. literalinclude :: controllers/006.php
9797
98- Private methods
99- ***************
98+ Protecting Methods
99+ ******************
100100
101101In some cases, you may want certain methods hidden from public access.
102102To achieve this, simply declare the method as ``private `` or ``protected ``.
103- That will prevent it from being served by a URL request. For example,
104- if you were to define a method like this for the ``Helloworld `` controller:
103+ That will prevent it from being served by a URL request.
104+
105+ For example, if you were to define a method like this for the ``Helloworld `` controller:
105106
106107.. literalinclude :: controllers/007.php
107108
108- then trying to access it using the following URL will not work::
109+ and to define a route (``helloworld/utitilty ``) for the method. Then trying to access it using the following URL will not work::
110+
111+ example.com/index.php/helloworld/utility
109112
110- example.com/index.php/helloworld/utility/
113+ Auto-routing also will not work.
111114
112115.. _controller-auto-routing-improved :
113116
You can’t perform that action at this time.
0 commit comments