PHP Class CI_Output, TastyIgniter

Responsible for sending final output to browser
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$cache_expiration integer Cache expiration time
$enable_profiler boolean Enable Profiler flag
$final_output string Final output string
$headers array List of server headers
$mimes array List of mime types
$parse_exec_vars boolean Whether or not to parse variables like {elapsed_time} and {memory_usage}.

Protected Properties

Свойство Type Description
$_compress_output boolean CI output compression flag
$_profiler_sections array List of profiler sections
$_zlib_oc boolean php.ini zlib.output_compression flag
$mime_type string Mime-type for the current page

Méthodes publiques

Méthode Description
__construct ( ) : void Class constructor
_display ( string $output = '' ) : void Display Output
_display_cache ( &$CFG, &$URI ) : boolean Update/serve cached output
_write_cache ( string $output ) : void Write Cache
append_output ( string $output ) : CI_Output Append Output
cache ( integer $time ) : CI_Output Set Cache
delete_cache ( string $uri = '' ) : boolean Delete cache
enable_profiler ( boolean $val = TRUE ) : CI_Output Enable/disable Profiler
get_content_type ( ) : string Get Current Content-Type Header
get_header ( $header ) : string Get Header
get_output ( ) : string Get Output
set_cache_header ( integer $last_modified, integer $expiration ) : void Set Cache Header
set_content_type ( string $mime_type, string $charset = NULL ) : CI_Output Set Content-Type Header
set_header ( string $header, boolean $replace = TRUE ) : CI_Output Set Header
set_output ( string $output ) : CI_Output Set Output
set_profiler_sections ( array $sections ) : CI_Output Set Profiler Sections
set_status_header ( integer $code = 200, string $text = '' ) : CI_Output Set HTTP Status Header

Method Details

__construct() public méthode

Determines whether zLib output compression will be used.
public __construct ( ) : void
Résultat void

_display() public méthode

Processes and sends finalized output data to the browser along with any server headers and profile data. It also stops benchmark timers so the page rendering speed and memory usage can be shown. Note: All "view" data is automatically put into $this->final_output by controller class.
public _display ( string $output = '' ) : void
$output string Output data override
Résultat void

_display_cache() public méthode

Update/serve cached output
public _display_cache ( &$CFG, &$URI ) : boolean
Résultat boolean TRUE on success or FALSE on failure

_write_cache() public méthode

Write Cache
public _write_cache ( string $output ) : void
$output string Output data to cache
Résultat void

append_output() public méthode

Appends data onto the output string.
public append_output ( string $output ) : CI_Output
$output string Data to append
Résultat CI_Output

cache() public méthode

Set Cache
public cache ( integer $time ) : CI_Output
$time integer Cache expiration time in minutes
Résultat CI_Output

delete_cache() public méthode

Delete cache
public delete_cache ( string $uri = '' ) : boolean
$uri string URI string
Résultat boolean

enable_profiler() public méthode

Enable/disable Profiler
public enable_profiler ( boolean $val = TRUE ) : CI_Output
$val boolean TRUE to enable or FALSE to disable
Résultat CI_Output

get_content_type() public méthode

Get Current Content-Type Header
public get_content_type ( ) : string
Résultat string 'text/html', if not already set

get_header() public méthode

Get Header
public get_header ( $header ) : string
Résultat string

get_output() public méthode

Returns the current output string.
public get_output ( ) : string
Résultat string

set_cache_header() public méthode

Set the HTTP headers to match the server-side file cache settings in order to reduce bandwidth.
public set_cache_header ( integer $last_modified, integer $expiration ) : void
$last_modified integer Timestamp of when the page was last modified
$expiration integer Timestamp of when should the requested page expire from cache
Résultat void

set_content_type() public méthode

Set Content-Type Header
public set_content_type ( string $mime_type, string $charset = NULL ) : CI_Output
$mime_type string Extension of the file we're outputting
$charset string Character set (default: NULL)
Résultat CI_Output

set_header() public méthode

Lets you set a server header which will be sent with the final output. Note: If a file is cached, headers will not be sent.
public set_header ( string $header, boolean $replace = TRUE ) : CI_Output
$header string Header
$replace boolean Whether to replace the old header value, if already set
Résultat CI_Output

set_output() public méthode

Sets the output string.
public set_output ( string $output ) : CI_Output
$output string Output data
Résultat CI_Output

set_profiler_sections() public méthode

Allows override of default/config settings for Profiler section display.
public set_profiler_sections ( array $sections ) : CI_Output
$sections array Profiler sections
Résultat CI_Output

set_status_header() public méthode

As of version 1.7.2, this is an alias for common function set_status_header().
public set_status_header ( integer $code = 200, string $text = '' ) : CI_Output
$code integer Status code (default: 200)
$text string Optional message
Résultat CI_Output

Property Details

$_compress_output protected_oe property

CI output compression flag
protected bool $_compress_output
Résultat boolean

$_profiler_sections protected_oe property

List of profiler sections
protected array $_profiler_sections
Résultat array

$_zlib_oc protected_oe property

php.ini zlib.output_compression flag
protected bool $_zlib_oc
Résultat boolean

$cache_expiration public_oe property

Cache expiration time
public int $cache_expiration
Résultat integer

$enable_profiler public_oe property

Enable Profiler flag
public bool $enable_profiler
Résultat boolean

$final_output public_oe property

Final output string
public string $final_output
Résultat string

$headers public_oe property

List of server headers
public array $headers
Résultat array

$mime_type protected_oe property

Mime-type for the current page
protected string $mime_type
Résultat string

$mimes public_oe property

List of mime types
public array $mimes
Résultat array

$parse_exec_vars public_oe property

Whether or not to parse variables like {elapsed_time} and {memory_usage}.
public bool $parse_exec_vars
Résultat boolean