blob: bcba2577ab798f10fd70a28a4900b41804e98f2f [file] [log] [blame]
Derek Allard2067d1a2008-11-13 22:59:24 +00001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * CodeIgniter
4 *
Greg Aker741de1c2010-11-10 14:52:57 -06005 * An open source application development framework for PHP 5.1.6 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
7 * @package CodeIgniter
8 * @author ExpressionEngine Dev Team
Greg Aker0711dc82011-01-05 10:49:40 -06009 * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
Derek Allard2067d1a2008-11-13 22:59:24 +000010 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
12 * @since Version 1.0
13 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * Output Class
20 *
21 * Responsible for sending final output to browser
22 *
23 * @package CodeIgniter
24 * @subpackage Libraries
25 * @category Output
26 * @author ExpressionEngine Dev Team
27 * @link http://codeigniter.com/user_guide/libraries/output.html
28 */
29class CI_Output {
30
Eric Barnesbb5d4f72011-03-18 13:39:58 -040031 public $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage}
Phil Sturgeon60ed1a32011-03-08 21:43:54 +000032 protected $final_output;
33 protected $cache_expiration = 0;
34 protected $headers = array();
35 protected $mime_types = array();
36 protected $enable_profiler = FALSE;
Phil Sturgeon60ed1a32011-03-08 21:43:54 +000037 protected $_zlib_oc = FALSE;
38 protected $_profiler_sections = array();
Derek Jonesee71c802010-03-10 10:05:05 -060039
Greg Akera9263282010-11-10 15:26:43 -060040 function __construct()
Derek Allard2067d1a2008-11-13 22:59:24 +000041 {
Pascal Kriete676e1cd2010-04-09 21:16:16 +020042 $this->_zlib_oc = @ini_get('zlib.output_compression');
Barry Mienydd671972010-10-04 16:33:58 +020043
Phil Sturgeon60ed1a32011-03-08 21:43:54 +000044 // Get mime types for later
Phil Sturgeon05fa6112011-04-06 22:57:43 +010045 if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
bubbafoley0ea04142011-03-17 14:55:41 -050046 {
47 include APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT;
48 }
49 else
50 {
51 include APPPATH.'config/mimes'.EXT;
52 }
Eric Barnesbb5d4f72011-03-18 13:39:58 -040053
54
Phil Sturgeon60ed1a32011-03-08 21:43:54 +000055 $this->mime_types = $mimes;
Eric Barnesbb5d4f72011-03-18 13:39:58 -040056
Derek Allard2067d1a2008-11-13 22:59:24 +000057 log_message('debug', "Output Class Initialized");
58 }
Barry Mienydd671972010-10-04 16:33:58 +020059
Derek Allard2067d1a2008-11-13 22:59:24 +000060 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +020061
Derek Allard2067d1a2008-11-13 22:59:24 +000062 /**
63 * Get Output
64 *
65 * Returns the current output string
66 *
67 * @access public
68 * @return string
Barry Mienydd671972010-10-04 16:33:58 +020069 */
Derek Allard2067d1a2008-11-13 22:59:24 +000070 function get_output()
71 {
72 return $this->final_output;
73 }
Barry Mienydd671972010-10-04 16:33:58 +020074
Derek Allard2067d1a2008-11-13 22:59:24 +000075 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +020076
Derek Allard2067d1a2008-11-13 22:59:24 +000077 /**
78 * Set Output
79 *
80 * Sets the output string
81 *
82 * @access public
83 * @param string
84 * @return void
Barry Mienydd671972010-10-04 16:33:58 +020085 */
Derek Allard2067d1a2008-11-13 22:59:24 +000086 function set_output($output)
87 {
88 $this->final_output = $output;
Eric Barnesbb5d4f72011-03-18 13:39:58 -040089
Phil Sturgeon60ed1a32011-03-08 21:43:54 +000090 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +000091 }
92
93 // --------------------------------------------------------------------
94
95 /**
96 * Append Output
97 *
98 * Appends data onto the output string
99 *
100 * @access public
101 * @param string
102 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200103 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000104 function append_output($output)
105 {
106 if ($this->final_output == '')
107 {
108 $this->final_output = $output;
109 }
110 else
111 {
112 $this->final_output .= $output;
113 }
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000114
115 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000116 }
117
118 // --------------------------------------------------------------------
119
120 /**
121 * Set Header
122 *
123 * Lets you set a server header which will be outputted with the final display.
124 *
125 * Note: If a file is cached, headers will not be sent. We need to figure out
126 * how to permit header data to be saved with the cache data...
127 *
128 * @access public
129 * @param string
130 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200131 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000132 function set_header($header, $replace = TRUE)
133 {
Pascal Kriete676e1cd2010-04-09 21:16:16 +0200134 // If zlib.output_compression is enabled it will compress the output,
135 // but it will not modify the content-length header to compensate for
136 // the reduction, causing the browser to hang waiting for more data.
137 // We'll just skip content-length in those cases.
Barry Mienydd671972010-10-04 16:33:58 +0200138
Pascal Kriete676e1cd2010-04-09 21:16:16 +0200139 if ($this->_zlib_oc && strncasecmp($header, 'content-length', 14) == 0)
140 {
141 return;
142 }
Barry Mienydd671972010-10-04 16:33:58 +0200143
Derek Allard2067d1a2008-11-13 22:59:24 +0000144 $this->headers[] = array($header, $replace);
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000145
146 return $this;
147 }
148
149 // --------------------------------------------------------------------
150
151 /**
152 * Set Content Type Header
153 *
154 * @access public
155 * @param string extension of the file we're outputting
156 * @return void
157 */
158 function set_content_type($mime_type)
159 {
160 if (strpos($mime_type, '/') === FALSE)
161 {
162 $extension = ltrim($mime_type, '.');
163
164 // Is this extension supported?
165 if (isset($this->mime_types[$extension]))
166 {
167 $mime_type =& $this->mime_types[$extension];
168
169 if (is_array($mime_type))
170 {
171 $mime_type = current($mime_type);
172 }
173 }
174 }
175
176 $header = 'Content-Type: '.$mime_type;
177
178 $this->headers[] = array($header, TRUE);
Eric Barnesbb5d4f72011-03-18 13:39:58 -0400179
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000180 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000181 }
182
183 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200184
Derek Allard2067d1a2008-11-13 22:59:24 +0000185 /**
186 * Set HTTP Status Header
Derek Jones817163a2009-07-11 17:05:58 +0000187 * moved to Common procedural functions in 1.7.2
Barry Mienydd671972010-10-04 16:33:58 +0200188 *
Derek Allard2067d1a2008-11-13 22:59:24 +0000189 * @access public
Barry Mienydd671972010-10-04 16:33:58 +0200190 * @param int the status code
191 * @param string
Derek Allard2067d1a2008-11-13 22:59:24 +0000192 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200193 */
Derek Jones46520492010-03-02 13:53:25 -0600194 function set_status_header($code = 200, $text = '')
Derek Allard2067d1a2008-11-13 22:59:24 +0000195 {
Derek Jones817163a2009-07-11 17:05:58 +0000196 set_status_header($code, $text);
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000197
198 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000199 }
Barry Mienydd671972010-10-04 16:33:58 +0200200
Derek Allard2067d1a2008-11-13 22:59:24 +0000201 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200202
Derek Allard2067d1a2008-11-13 22:59:24 +0000203 /**
204 * Enable/disable Profiler
205 *
206 * @access public
207 * @param bool
208 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200209 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000210 function enable_profiler($val = TRUE)
211 {
212 $this->enable_profiler = (is_bool($val)) ? $val : TRUE;
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000213
214 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000215 }
Barry Mienydd671972010-10-04 16:33:58 +0200216
Derek Allard2067d1a2008-11-13 22:59:24 +0000217 // --------------------------------------------------------------------
Derek Jonesee71c802010-03-10 10:05:05 -0600218
219 /**
220 * Set Profiler Sections
221 *
222 * Allows override of default / config settings for Profiler section display
223 *
224 * @access public
225 * @param array
226 * @return void
227 */
228 function set_profiler_sections($sections)
229 {
230 foreach ($sections as $section => $enable)
231 {
232 $this->_profiler_sections[$section] = ($enable !== FALSE) ? TRUE : FALSE;
233 }
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000234
235 return $this;
Derek Jonesee71c802010-03-10 10:05:05 -0600236 }
237
238 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200239
Derek Allard2067d1a2008-11-13 22:59:24 +0000240 /**
241 * Set Cache
242 *
243 * @access public
244 * @param integer
245 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200246 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000247 function cache($time)
248 {
249 $this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time;
Phil Sturgeon60ed1a32011-03-08 21:43:54 +0000250
251 return $this;
Derek Allard2067d1a2008-11-13 22:59:24 +0000252 }
Barry Mienydd671972010-10-04 16:33:58 +0200253
Derek Allard2067d1a2008-11-13 22:59:24 +0000254 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200255
Derek Allard2067d1a2008-11-13 22:59:24 +0000256 /**
257 * Display Output
258 *
259 * All "view" data is automatically put into this variable by the controller class:
260 *
261 * $this->final_output
262 *
263 * This function sends the finalized output data to the browser along
264 * with any server headers and profile data. It also stops the
265 * benchmark timer so the page rendering speed and memory usage can be shown.
266 *
267 * @access public
268 * @return mixed
Barry Mienydd671972010-10-04 16:33:58 +0200269 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000270 function _display($output = '')
Barry Mienydd671972010-10-04 16:33:58 +0200271 {
Derek Allard2067d1a2008-11-13 22:59:24 +0000272 // Note: We use globals because we can't use $CI =& get_instance()
273 // since this function is sometimes called by the caching mechanism,
274 // which happens before the CI super object is available.
275 global $BM, $CFG;
Derek Jonesd7633492010-09-28 13:14:57 -0500276
277 // Grab the super object if we can.
Greg Akercc922102010-11-17 20:25:08 -0600278 if (class_exists('CI_Controller'))
Derek Jonesd7633492010-09-28 13:14:57 -0500279 {
280 $CI =& get_instance();
281 }
282
Derek Allard2067d1a2008-11-13 22:59:24 +0000283 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200284
Derek Allard2067d1a2008-11-13 22:59:24 +0000285 // Set the output data
286 if ($output == '')
287 {
288 $output =& $this->final_output;
289 }
Barry Mienydd671972010-10-04 16:33:58 +0200290
Derek Allard2067d1a2008-11-13 22:59:24 +0000291 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200292
Derek Jonesd7633492010-09-28 13:14:57 -0500293 // Do we need to write a cache file? Only if the controller does not have its
294 // own _output() method and we are not dealing with a cache file, which we
295 // can determine by the existence of the $CI object above
296 if ($this->cache_expiration > 0 && isset($CI) && ! method_exists($CI, '_output'))
Derek Allard2067d1a2008-11-13 22:59:24 +0000297 {
298 $this->_write_cache($output);
299 }
Barry Mienydd671972010-10-04 16:33:58 +0200300
Derek Allard2067d1a2008-11-13 22:59:24 +0000301 // --------------------------------------------------------------------
302
303 // Parse out the elapsed time and memory usage,
304 // then swap the pseudo-variables with the data
Barry Mienydd671972010-10-04 16:33:58 +0200305
306 $elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
Derek Jones46520492010-03-02 13:53:25 -0600307
308 if ($this->parse_exec_vars === TRUE)
309 {
310 $memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
Barry Mienydd671972010-10-04 16:33:58 +0200311
Derek Jones46520492010-03-02 13:53:25 -0600312 $output = str_replace('{elapsed_time}', $elapsed, $output);
313 $output = str_replace('{memory_usage}', $memory, $output);
314 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000315
316 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200317
Derek Allard2067d1a2008-11-13 22:59:24 +0000318 // Is compression requested?
Pascal Kriete676e1cd2010-04-09 21:16:16 +0200319 if ($CFG->item('compress_output') === TRUE && $this->_zlib_oc == FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000320 {
321 if (extension_loaded('zlib'))
322 {
323 if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE)
324 {
325 ob_start('ob_gzhandler');
326 }
327 }
328 }
329
330 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200331
Derek Allard2067d1a2008-11-13 22:59:24 +0000332 // Are there any server headers to send?
333 if (count($this->headers) > 0)
334 {
335 foreach ($this->headers as $header)
336 {
337 @header($header[0], $header[1]);
338 }
Barry Mienydd671972010-10-04 16:33:58 +0200339 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000340
341 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200342
Derek Jonesd7633492010-09-28 13:14:57 -0500343 // Does the $CI object exist?
Derek Allard2067d1a2008-11-13 22:59:24 +0000344 // If not we know we are dealing with a cache file so we'll
345 // simply echo out the data and exit.
Derek Jonesd7633492010-09-28 13:14:57 -0500346 if ( ! isset($CI))
Derek Allard2067d1a2008-11-13 22:59:24 +0000347 {
348 echo $output;
349 log_message('debug', "Final output sent to browser");
350 log_message('debug', "Total execution time: ".$elapsed);
351 return TRUE;
352 }
Barry Mienydd671972010-10-04 16:33:58 +0200353
Derek Allard2067d1a2008-11-13 22:59:24 +0000354 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200355
Derek Allard2067d1a2008-11-13 22:59:24 +0000356 // Do we need to generate profile data?
357 // If so, load the Profile class and run it.
358 if ($this->enable_profiler == TRUE)
359 {
Barry Mienydd671972010-10-04 16:33:58 +0200360 $CI->load->library('profiler');
361
Derek Jonesee71c802010-03-10 10:05:05 -0600362 if ( ! empty($this->_profiler_sections))
363 {
364 $CI->profiler->set_sections($this->_profiler_sections);
Barry Mienydd671972010-10-04 16:33:58 +0200365 }
Derek Jonesee71c802010-03-10 10:05:05 -0600366
Derek Allard2067d1a2008-11-13 22:59:24 +0000367 // If the output data contains closing </body> and </html> tags
368 // we will remove them and add them back after we insert the profile data
369 if (preg_match("|</body>.*?</html>|is", $output))
370 {
371 $output = preg_replace("|</body>.*?</html>|is", '', $output);
372 $output .= $CI->profiler->run();
373 $output .= '</body></html>';
374 }
375 else
376 {
377 $output .= $CI->profiler->run();
378 }
379 }
Barry Mienydd671972010-10-04 16:33:58 +0200380
Derek Allard2067d1a2008-11-13 22:59:24 +0000381 // --------------------------------------------------------------------
382
383 // Does the controller contain a function named _output()?
384 // If so send the output there. Otherwise, echo it.
385 if (method_exists($CI, '_output'))
386 {
387 $CI->_output($output);
388 }
389 else
390 {
391 echo $output; // Send it to the browser!
392 }
Barry Mienydd671972010-10-04 16:33:58 +0200393
Derek Allard2067d1a2008-11-13 22:59:24 +0000394 log_message('debug', "Final output sent to browser");
Barry Mienydd671972010-10-04 16:33:58 +0200395 log_message('debug', "Total execution time: ".$elapsed);
Derek Allard2067d1a2008-11-13 22:59:24 +0000396 }
Barry Mienydd671972010-10-04 16:33:58 +0200397
Derek Allard2067d1a2008-11-13 22:59:24 +0000398 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200399
Derek Allard2067d1a2008-11-13 22:59:24 +0000400 /**
401 * Write a Cache File
402 *
403 * @access public
404 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200405 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000406 function _write_cache($output)
407 {
Barry Mienydd671972010-10-04 16:33:58 +0200408 $CI =& get_instance();
Derek Allard2067d1a2008-11-13 22:59:24 +0000409 $path = $CI->config->item('cache_path');
Barry Mienydd671972010-10-04 16:33:58 +0200410
Greg Aker2eaa4072010-12-21 11:44:08 -0600411 $cache_path = ($path == '') ? APPPATH.'cache/' : $path;
Barry Mienydd671972010-10-04 16:33:58 +0200412
Derek Allard2067d1a2008-11-13 22:59:24 +0000413 if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
414 {
Greg Akera7f5a942010-09-14 17:20:53 -0500415 log_message('error', "Unable to write cache file: ".$cache_path);
Derek Allard2067d1a2008-11-13 22:59:24 +0000416 return;
417 }
Barry Mienydd671972010-10-04 16:33:58 +0200418
Derek Allard2067d1a2008-11-13 22:59:24 +0000419 $uri = $CI->config->item('base_url').
420 $CI->config->item('index_page').
421 $CI->uri->uri_string();
Barry Mienydd671972010-10-04 16:33:58 +0200422
Derek Allard2067d1a2008-11-13 22:59:24 +0000423 $cache_path .= md5($uri);
424
425 if ( ! $fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))
426 {
427 log_message('error', "Unable to write cache file: ".$cache_path);
428 return;
429 }
Barry Mienydd671972010-10-04 16:33:58 +0200430
Derek Allard2067d1a2008-11-13 22:59:24 +0000431 $expire = time() + ($this->cache_expiration * 60);
Barry Mienydd671972010-10-04 16:33:58 +0200432
Derek Allard2067d1a2008-11-13 22:59:24 +0000433 if (flock($fp, LOCK_EX))
434 {
435 fwrite($fp, $expire.'TS--->'.$output);
436 flock($fp, LOCK_UN);
437 }
438 else
439 {
440 log_message('error', "Unable to secure a file lock for file at: ".$cache_path);
441 return;
442 }
443 fclose($fp);
Derek Jones172e1612009-10-13 14:32:48 +0000444 @chmod($cache_path, FILE_WRITE_MODE);
Derek Allard2067d1a2008-11-13 22:59:24 +0000445
446 log_message('debug', "Cache file written: ".$cache_path);
447 }
448
449 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200450
Derek Allard2067d1a2008-11-13 22:59:24 +0000451 /**
452 * Update/serve a cached file
453 *
454 * @access public
455 * @return void
Barry Mienydd671972010-10-04 16:33:58 +0200456 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000457 function _display_cache(&$CFG, &$URI)
458 {
Greg Aker2eaa4072010-12-21 11:44:08 -0600459 $cache_path = ($CFG->item('cache_path') == '') ? APPPATH.'cache/' : $CFG->item('cache_path');
Barry Mienydd671972010-10-04 16:33:58 +0200460
Derek Allard2067d1a2008-11-13 22:59:24 +0000461 // Build the file path. The file name is an MD5 hash of the full URI
462 $uri = $CFG->item('base_url').
463 $CFG->item('index_page').
464 $URI->uri_string;
Barry Mienydd671972010-10-04 16:33:58 +0200465
Derek Allard2067d1a2008-11-13 22:59:24 +0000466 $filepath = $cache_path.md5($uri);
Barry Mienydd671972010-10-04 16:33:58 +0200467
Derek Allard2067d1a2008-11-13 22:59:24 +0000468 if ( ! @file_exists($filepath))
469 {
470 return FALSE;
471 }
Barry Mienydd671972010-10-04 16:33:58 +0200472
Derek Allard2067d1a2008-11-13 22:59:24 +0000473 if ( ! $fp = @fopen($filepath, FOPEN_READ))
474 {
475 return FALSE;
476 }
Barry Mienydd671972010-10-04 16:33:58 +0200477
Derek Allard2067d1a2008-11-13 22:59:24 +0000478 flock($fp, LOCK_SH);
Barry Mienydd671972010-10-04 16:33:58 +0200479
Derek Allard2067d1a2008-11-13 22:59:24 +0000480 $cache = '';
481 if (filesize($filepath) > 0)
482 {
483 $cache = fread($fp, filesize($filepath));
484 }
Barry Mienydd671972010-10-04 16:33:58 +0200485
Derek Allard2067d1a2008-11-13 22:59:24 +0000486 flock($fp, LOCK_UN);
487 fclose($fp);
Barry Mienydd671972010-10-04 16:33:58 +0200488
489 // Strip out the embedded timestamp
Derek Allard2067d1a2008-11-13 22:59:24 +0000490 if ( ! preg_match("/(\d+TS--->)/", $cache, $match))
491 {
492 return FALSE;
493 }
Barry Mienydd671972010-10-04 16:33:58 +0200494
Derek Allard2067d1a2008-11-13 22:59:24 +0000495 // Has the file expired? If so we'll delete it.
496 if (time() >= trim(str_replace('TS--->', '', $match['1'])))
Derek Jonesd99e6032010-03-19 19:57:33 -0500497 {
498 if (is_really_writable($cache_path))
499 {
500 @unlink($filepath);
501 log_message('debug', "Cache file has expired. File deleted");
Barry Mienydd671972010-10-04 16:33:58 +0200502 return FALSE;
Derek Jonesd99e6032010-03-19 19:57:33 -0500503 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000504 }
505
506 // Display the cache
507 $this->_display(str_replace($match['0'], '', $cache));
Barry Mienydd671972010-10-04 16:33:58 +0200508 log_message('debug', "Cache file is current. Sending it to browser.");
Derek Allard2067d1a2008-11-13 22:59:24 +0000509 return TRUE;
510 }
511
512
513}
514// END Output Class
515
516/* End of file Output.php */
Derek Jonesc68dfbf2010-03-02 12:59:23 -0600517/* Location: ./system/core/Output.php */