From baa581846cbf04b0c225cbb21b0f6138ff805d79 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 23 Sep 2006 03:59:30 +0000 Subject: --- user_guide/general/controllers.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'user_guide/general') 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.

Processing Output

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 -Views and Output class 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 +Views and Output class 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 _output() to your controller that will receive the finalized output data. -

Important:  If your controller contains a function named _output(), it will always +

Important:  If your controller contains a function named _output(), it will always be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.

Here is an example:

@@ -271,8 +271,11 @@ function _output($output)
    echo $output;
} -

Please note that your _output() 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.

+

Please note that your _output() 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 feature) +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 before any of the final processing is done, please see +the available methods in the Output Class.

Private Functions

-- cgit v1.2.3-24-g4f1b