Class CI_Output - echiong/testRepo GitHub Wiki

##Class CI_Output

Output Class

Responsible for sending final output to browser

Package: [[CodeIgniter<a href="Package CodeIgniter.Libraries.md">Libraries]]
Category: Output
Author: ExpressionEngine Dev Team
Link: http://codeigniter.com/user_guide/libraries/output.html
Located at system/core/Output.php

##Methods summary


public __construct ( )

Constructor


public string get_output ( )

Get Output

Returns the current output string

Returns string


public set_output ( string $output )

Set Output

Sets the output string

Parameters

$output string


public append_output ( string $output )

Append Output

Appends data onto the output string

Parameters

$output string


public set_header ( string $header, boolean $replace = TRUE )

Set Header

Lets you set a server header which will be outputted with the final display.

Note: If a file is cached, headers will not be sent. We need to figure out how to permit header data to be saved with the cache data...

Parameters

$header string

$replace boolean


public set_content_type ( string $mime_type )

Set Content Type Header

Parameters

$mime_type string
extension of the file we're outputting


public set_status_header ( integer $code = 200, string $text = '' )

Set HTTP Status Header moved to Common procedural functions in 1.7.2

Parameters

$code integer
the status code

$text string


public enable_profiler ( boolean $val = TRUE )

Enable/disable Profiler

Parameters

$val boolean


public set_profiler_sections ( array $sections )

Set Profiler Sections

Allows override of default / config settings for Profiler section display

Parameters

$sections array


public cache ( integer $time )

Set Cache

Parameters

$time integer


public mixed _display ( string $output = '' )

Display Output

All "view" data is automatically put into this variable by the controller class:

$this->final_output

This function sends the finalized output data to the browser along with any server headers and profile data. It also stops the benchmark timer so the page rendering speed and memory usage can be shown.

Parameters

$output string

Returns mixed


public _write_cache ( string $output )

Write a Cache File

Parameters

$output string


public _display_cache ( object & $CFG, object & $URI )

Update/serve a cached file

Parameters

$CFG object
config class

$URI object
uri class

<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="final_output" id="$final_output">
	<td class="attributes"><code>
		protected  
		string
	</code></td>

	<td class="name">

$final_output

#
		<div class="description detailed">

Current output string

		</div>
	</div></td>
</tr>
<tr data-order="cache_expiration" id="$cache_expiration">
	<td class="attributes"><code>
		protected  
		integer
	</code></td>

	<td class="name">

$cache_expiration

0
#
		<div class="description detailed">

Cache expiration time

		</div>
	</div></td>
</tr>
<tr data-order="headers" id="$headers">
	<td class="attributes"><code>
		protected  
		array
	</code></td>

	<td class="name">

$headers

array()
#
		<div class="description detailed">

List of server headers

		</div>
	</div></td>
</tr>
<tr data-order="mime_types" id="$mime_types">
	<td class="attributes"><code>
		protected  
		array
	</code></td>

	<td class="name">

$mime_types

array()
#
		<div class="description detailed">

List of mime types

		</div>
	</div></td>
</tr>
<tr data-order="enable_profiler" id="$enable_profiler">
	<td class="attributes"><code>
		protected  
		book
	</code></td>

	<td class="name">

$enable_profiler

FALSE
#
		<div class="description detailed">

Determines wether profiler is enabled

		</div>
	</div></td>
</tr>
<tr data-order="_zlib_oc" id="$_zlib_oc">
	<td class="attributes"><code>
		protected  
		boolean
	</code></td>

	<td class="name">

$_zlib_oc

FALSE
#
		<div class="description detailed">

Determines if output compression is enabled

		</div>
	</div></td>
</tr>
<tr data-order="_profiler_sections" id="$_profiler_sections">
	<td class="attributes"><code>
		protected  
		array
	</code></td>

	<td class="name">

$_profiler_sections

array()
#
		<div class="description detailed">

List of profiler sections

		</div>
	</div></td>
</tr>
<tr data-order="parse_exec_vars" id="$parse_exec_vars">
	<td class="attributes"><code>
		protected  
		boolean
	</code></td>

	<td class="name">

$parse_exec_vars

TRUE
#
		<div class="description detailed">

Whether or not to parse variables like {elapsed_time} and {memory_usage}

		</div>
	</div></td>
</tr>
</table>
⚠️ **GitHub.com Fallback** ⚠️