CI_Session::has_userdata()

has_userdata($key) Parameters: $key (string) – Session item key Returns: TRUE if the specified key exists, FALSE if not Return type: bool Checks if an item exists in $_SESSION. Note This is a legacy method kept only for backwards compatibility with older applications. It is just an alias for isset($_SESSION[$key]) - please use that instead.

CI_Security::get_random_bytes()

get_random_bytes($length) Parameters: $length (int) – Output length Returns: A binary stream of random bytes or FALSE on failure Return type: string A convenience method for getting proper random bytes via mcrypt_create_iv(), /dev/urandom or openssl_random_pseudo_bytes() (in that order), if one of them is available. Used for generating CSRF and XSS tokens. Note The output is NOT guaranteed to be cryptographically secure, just the best attempt at that.

xss_clean()

xss_clean($str[, $is_image = FALSE]) Parameters: $str (string) – Input data $is_image (bool) – Whether we’re dealing with an image Returns: XSS-clean string Return type: string Provides Cross Site Script Hack filtering. This function is an alias for CI_Input::xss_clean(). For more info, please see the Input Library documentation.

encode_php_tags()

encode_php_tags($str) Parameters: $str (string) – Input string Returns: Safely formatted string Return type: string This is a security function that converts PHP tags to entities. Note xss_clean() does this automatically, if you use it. Example: $string = encode_php_tags($string);

CI_Lang::load()

load($langfile[, $idiom = ''[, $return = FALSE[, $add_suffix = TRUE[, $alt_path = '']]]]) Parameters: $langfile (mixed) – Language file to load or array with multiple files $idiom (string) – Language name (i.e. ‘english’) $return (bool) – Whether to return the loaded array of translations $add_suffix (bool) – Whether to add the ‘_lang’ suffix to the language file name $alt_path (string) – An alternative path to look in for the language file Returns: Array of language lines if $return

CI_Loader::language()

language($files[, $lang = '']) Parameters: $files (mixed) – Language file name or an array of multiple language files $lang (string) – Language name Returns: CI_Loader instance (method chaining) Return type: CI_Loader This method is an alias of the language loading method: $this->lang->load().

CI_Loader::file()

file($path[, $return = FALSE]) Parameters: $path (string) – File path $return (bool) – Whether to return the loaded file Returns: File contents if $return is set to TRUE, otherwise CI_Loader instance (method chaining) Return type: mixed This is a generic file loading method. Supply the filepath and name in the first parameter and it will open and read the file. By default the data is sent to your browser, just like a View file, but if you set the second parameter to boolean TRUE it

CI_Loader::database()

database([$params = ''[, $return = FALSE[, $query_builder = NULL]]]) Parameters: $params (mixed) – Database group name or configuration options $return (bool) – Whether to return the loaded database object $query_builder (bool) – Whether to load the Query Builder Returns: Loaded CI_DB instance or FALSE on failure if $return is set to TRUE, otherwise CI_Loader instance (method chaining) Return type: mixed This method lets you load the database class. The two parameters are optional

CI_Migration::version()

version($target_version) Parameters: $target_version (mixed) – Migration version to process Returns: TRUE if no migrations are found, current version string on success, FALSE on failure Return type: mixed Version can be used to roll back changes or step forwards programmatically to specific versions. It works just like current() but ignores $config['migration_version']. $this->migration->version(5);

CI_Output::cache()

cache($time) Parameters: $time (int) – Cache expiration time in minutes Returns: CI_Output instance (method chaining) Return type: CI_Output Caches the current page for the specified amount of minutes. For more information, please see the caching documentation.