summaryrefslogtreecommitdiffstats
path: root/user_guide/general/hooks.html
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide/general/hooks.html')
-rw-r--r--user_guide/general/hooks.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
index 1293d12eb..c0d616c50 100644
--- a/user_guide/general/hooks.html
+++ b/user_guide/general/hooks.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -73,7 +73,7 @@ your own scripts in some other location.
<h2>Defining a Hook</h2>
-<p>Hooks are defined in <dfn>application/config/hooks.php</dfn> file. Each hook is specified as an array with this prototype:</p>
+<p>Hooks are defined in <dfn>application/config/hooks.php</dfn> file. Each hook is specified as an array with this prototype:</p>
<code>
$hook['pre_controller'] = array(<br />
@@ -85,14 +85,14 @@ $hook['pre_controller'] = array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</code>
<p><strong>Notes:</strong><br />The array index correlates to the name of the particular hook point you want to
-use. In the above example the hook point is <kbd>pre_controller</kbd>. A list of hook points is found below.
+use. In the above example the hook point is <kbd>pre_controller</kbd>. A list of hook points is found below.
The following items should be defined in your associative hook array:</p>
<ul>
<li><strong>class</strong>&nbsp; The name of the class you wish to invoke. If you prefer to use a procedural function instead of a class, leave this item blank.</li>
<li><strong>function</strong>&nbsp; The function name you wish to call.</li>
<li><strong>filename</strong>&nbsp; The file name containing your class/function.</li>
-<li><strong>filepath</strong>&nbsp; The name of the directory containing your script. Note: Your script must be located in a directory INSIDE your <kbd>application</kbd> folder, so the file path is relative to that folder. For example, if your script is located in <dfn>application/hooks</dfn>, you will simply use <samp>hooks</samp> as your filepath. If your script is located in <dfn>application/hooks/utilities</dfn> you will use <samp>hooks/utilities</samp> as your filepath. No trailing slash.</li>
+<li><strong>filepath</strong>&nbsp; The name of the directory containing your script. Note: Your script must be located in a directory INSIDE your <kbd>application</kbd> folder, so the file path is relative to that folder. For example, if your script is located in <dfn>application/hooks</dfn>, you will simply use <samp>hooks</samp> as your filepath. If your script is located in <dfn>application/hooks/utilities</dfn> you will use <samp>hooks/utilities</samp> as your filepath. No trailing slash.</li>
<li><strong>params</strong>&nbsp; Any parameters you wish to pass to your script. This item is optional.</li>
</ul>
@@ -122,7 +122,7 @@ $hook['pre_controller']<kbd>[]</kbd> = array(<br />
<code>$hook['pre_controller']<kbd>[]</kbd></code>
-<p>This permits you to have the same hook point with multiple scripts. The order you define your array will be the execution order.</p>
+<p>This permits you to have the same hook point with multiple scripts. The order you define your array will be the execution order.</p>
<h2>Hook Points</h2>
@@ -131,7 +131,7 @@ $hook['pre_controller']<kbd>[]</kbd> = array(<br />
<ul>
<li><strong>pre_system</strong><br />
- Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.</li>
+ Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.</li>
<li><strong>pre_controller</strong><br />
Called immediately prior to any of your controllers being called. All base classes, routing, and security checks have been done.</li>
<li><strong>post_controller_constructor</strong><br />
@@ -139,10 +139,10 @@ $hook['pre_controller']<kbd>[]</kbd> = array(<br />
<li><strong>post_controller</strong><br />
Called immediately after your controller is fully executed.</li>
<li><strong>display_override</strong><br />
- Overrides the <dfn>_display()</dfn> function, used to send the finalized page to the web browser at the end of system execution. This permits you to
- use your own display methodology. Note that you will need to reference the CI superobject with <dfn>$this->CI =&amp; get_instance()</dfn> and then the finalized data will be available by calling <dfn>$this->CI->output->get_output()</dfn></li>
+ Overrides the <dfn>_display()</dfn> function, used to send the finalized page to the web browser at the end of system execution. This permits you to
+ use your own display methodology. Note that you will need to reference the CI superobject with <dfn>$this->CI =&amp; get_instance()</dfn> and then the finalized data will be available by calling <dfn>$this->CI->output->get_output()</dfn></li>
<li><strong>cache_override</strong><br />
- Enables you to call your own function instead of the <dfn>_display_cache()</dfn> function in the output class. This permits you to use your own cache display mechanism.</li>
+ Enables you to call your own function instead of the <dfn>_display_cache()</dfn> function in the output class. This permits you to use your own cache display mechanism.</li>
<li><strong>post_system</strong><br />
Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.</li>
</ul>