\CI_Output

Output Class

Responsible for sending final output to browser

Summary

Methods
Properties
Constants
__construct()
get_output()
set_output()
append_output()
set_header()
set_content_type()
set_status_header()
enable_profiler()
set_profiler_sections()
cache()
_display()
_write_cache()
_display_cache()
No public properties found
No constants found
No protected methods found
$final_output
$cache_expiration
$headers
$mime_types
$enable_profiler
$_zlib_oc
$_profiler_sections
$parse_exec_vars
N/A
No private methods found
No private properties found
N/A

Properties

$final_output

$final_output : string

Current output string

Type

string

$cache_expiration

$cache_expiration : integer

Cache expiration time

Type

integer

$headers

$headers : array

List of server headers

Type

array

$mime_types

$mime_types : array

List of mime types

Type

array

$enable_profiler

$enable_profiler : \book

Determines wether profiler is enabled

Type

\book

$_zlib_oc

$_zlib_oc : boolean

Determines if output compression is enabled

Type

boolean

$_profiler_sections

$_profiler_sections : array

List of profiler sections

Type

array

$parse_exec_vars

$parse_exec_vars : boolean

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

Type

boolean

Methods

__construct()

__construct() 

Constructor

get_output()

get_output() : string

Get Output

Returns the current output string

Returns

string

set_output()

set_output(  $output) : void

Set Output

Sets the output string

Parameters

$output

append_output()

append_output(  $output) : void

Append Output

Appends data onto the output string

Parameters

$output

set_header()

set_header(  $header,   $replace = TRUE) : void

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
$replace

set_content_type()

set_content_type(  $mime_type) : void

Set Content Type Header

Parameters

$mime_type

set_status_header()

set_status_header(  $code = 200,   $text = '') : void

Set HTTP Status Header moved to Common procedural functions in 1.7.2

Parameters

$code
$text

enable_profiler()

enable_profiler(  $val = TRUE) : void

Enable/disable Profiler

Parameters

$val

set_profiler_sections()

set_profiler_sections(  $sections) : void

Set Profiler Sections

Allows override of default / config settings for Profiler section display

Parameters

$sections

cache()

cache(  $time) : void

Set Cache

Parameters

$time

_display()

_display(  $output = '') : mixed

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

Returns

mixed

_write_cache()

_write_cache(  $output) : void

Write a Cache File

Parameters

$output

_display_cache()

_display_cache(  $CFG,   $URI) : void

Update/serve a cached file

Parameters

$CFG
$URI