diff options
author | admin <devnull@localhost> | 2006-09-23 05:59:30 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-23 05:59:30 +0200 |
commit | baa581846cbf04b0c225cbb21b0f6138ff805d79 (patch) | |
tree | a881c49f772831ccb6ad336081c0196d8fd433f9 /user_guide/general/controllers.html | |
parent | 25f6fca75a49facb8c47a0c9abdab7862fc85c47 (diff) |
Diffstat (limited to 'user_guide/general/controllers.html')
-rw-r--r-- | user_guide/general/controllers.html | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 5c51f8ff0..4e39b23e2 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -256,11 +256,11 @@ allowing you to define your own function routing rules.</p> <h2>Processing Output</h2>
<p>Code Igniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this can be found in the
-<a href="views.html">Views</a> and <a href="../libraries/output.html">Output class</a> pages. In some cases, however, you might want to control
-how the output gets sent to the browser, or you might want to post process the finalized data in some way. Code Igniter permits you to
+<a href="views.html">Views</a> and <a href="../libraries/output.html">Output class</a> pages. In some cases, however, you might want to
+post-process the finalized data in some way and send it to the browser yourself. Code Igniter permits you to
add a function named <dfn>_output()</dfn> to your controller that will receive the finalized output data.
-<p class="important"><strong>Important:</strong> If your controller contains a function named <kbd>_output()</kbd>, it will <strong>always</strong>
+<p><strong>Important:</strong> If your controller contains a function named <kbd>_output()</kbd>, it will <strong>always</strong>
be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.</p>
<p>Here is an example:</p>
@@ -271,8 +271,11 @@ function _output($output)<br /> echo $output;<br />
}</code>
-<p>Please note that your <dfn>_output()</dfn> function will receive the data in its finalized form - including rendered benchmark and memory usage data,
-so if you are using this feature the page execution timer might not be perfectly accurate.</p>
+<p class="important">Please note that your <dfn>_output()</dfn> function will receive the data in its finalized state. Benchmark and memory usage data will be rendered,
+cache files written (if you have caching enabled), and headers will be sent (if you use that <a href="../libraries/Output.html">feature</a>)
+before it is handed off to the _output() function. If you are using this feature the page execution timer and memory usage stats might not be perfectly accurate
+since they will not take into acccount any further processing you do. For an alternate way to control output <em>before</em> any of the final processing is done, please see
+the available methods in the <a href="../libraries/Output.html">Output Class</a>.</p>
<a name="private"></a>
<h2>Private Functions</h2>
|