summaryrefslogtreecommitdiffstats
path: root/user_guide/general/hooks.html
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2011-07-02 00:56:50 +0200
committerDerek Jones <derek.jones@ellislab.com>2011-07-02 00:56:50 +0200
commit37f4b9caa02783e06dd7c5318200113409a0deb1 (patch)
tree314bd87831a09913cbbfd1ffe1447b3c38b394c5 /user_guide/general/hooks.html
parent114ab0988e20ac6be39ad363ff897a1a3b85e565 (diff)
backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance
Diffstat (limited to 'user_guide/general/hooks.html')
-rw-r--r--user_guide/general/hooks.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
index 1293d12eb..11de40902 100644
--- a/user_guide/general/hooks.html
+++ b/user_guide/general/hooks.html
@@ -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>