FUEL CMS User Guide : Version 1.5.2


Utility Helper

This helper is a collection of functions that assists a developer in capturing/debugging content and its related code

Function Reference [+]

CI()

Returns the global CI object.

Returns

object

capture(['$on'=TRUE], ['$clean'='all'])

Capture content via an output buffer.

Returns

string return buffered content

Parameters

(boolean) $on turn on output buffering
(string) $clean if set to 'all', will clear end the buffer and clean it

is_true_val('$val')

Format true value.

Returns

string formatted true value

Parameters

(mixed) $val possible true value

is_serialized_str('$data')

Boolean check to determine string content is serialized.

Returns

boolean

Parameters

(mixed) $data possible serialized string

is_json_str('$data')

Boolean check to determine string content is a JSON object string.

Returns

boolean

Parameters

(mixed) $data possible serialized string

print_obj('$obj', ['$return'=FALSE])

Print object in human-readible format.

Returns

string

Parameters

(mixed) $obj The variable to dump
(boolean) $return Return string

log_error('$error')

Logs an error message to logs file.

Returns

void

Parameters

(string) $error Error message

is_dev_mode()

Returns whether the current environment is set for development.

Returns

boolean

is_environment('$environment')

Returns whether the current environment is equal to the passed environment.

Returns

boolean