entity_decode()

entity_decode($str, $charset = NULL) Parameters: $str (string) – Input string $charset (string) – Character set Returns: String with decoded HTML entities Return type: string This function is an alias for CI_Security::entity_decode(). Fore more info, please see the Security Library documentation.

random_string()

random_string([$type = 'alnum'[, $len = 8]]) Parameters: $type (string) – Randomization type $len (int) – Output string length Returns: A random string Return type: string Generates a random string based on the type and length you specify. Useful for creating passwords or generating random hashes. The first parameter specifies the type of string, the second parameter specifies the length. The following choices are available: alpha: A string with lower and uppercase letters only.

CI_Session::set_userdata()

set_userdata($data[, $value = NULL]) Parameters: $data (mixed) – An array of key/value pairs to set as session data, or the key for a single item $value (mixed) – The value to set for a specific session item, if $data is a key Return type: void Assigns data to the $_SESSION superglobal. Note This is a legacy method kept only for backwards compatibility with older applications.

CI_Output::get_content_type()

get_content_type() Returns: Content-Type string Return type: string Returns the Content-Type HTTP header that’s currently in use, excluding the character set value. $mime = $this->output->get_content_type(); Note If not set, the default return value is ‘text/html’.

CI_Loader::helper()

helper($helpers) Parameters: $helpers (mixed) – Helper name as a string or an array containing multiple helpers Returns: CI_Loader instance (method chaining) Return type: CI_Loader This method loads helper files, where file_name is the name of the file, without the _helper.php extension.

CI_DB_driver::is_write_type()

is_write_type($sql) Parameters: $sql (string) – The SQL statement Returns: TRUE if the SQL statement is of “write type”, FALSE if not Return type: bool Determines if a query is of a “write” type (such as INSERT, UPDATE, DELETE) or “read” type (i.e. SELECT).

CI_DB_query_builder::or_where_in()

or_where_in([$key = NULL[, $values = NULL[, $escape = NULL]]]) Parameters: $key (string) – The field to search $values (array) – The values searched on $escape (bool) – Whether to escape values and identifiers Returns: DB_query_builder instance Return type: object Generates a WHERE field IN(‘item’, ‘item’) SQL query, joined with ‘OR’ if appropriate.

CI_Image_lib::watermark()

watermark() Returns: TRUE on success, FALSE on failure Return type: bool Creates a watermark over an image, please refer to the Watermarking an Image section for more info.

CI_Image_lib::crop()

crop() Returns: TRUE on success, FALSE on failure Return type: bool The cropping method works nearly identically to the resizing function except it requires that you set preferences for the X and Y axis (in pixels) specifying where to crop, like this: $config['x_axis'] = 100; $config['y_axis'] = 40; All preferences listed in the Preferences table are available for this method except these: rotation_angle, create_thumb and new_image. Here’s an example showing how you might crop an image: $

CI_Image_lib::display_errors()

display_errors([$open = ' [, $close = ' ']]) Parameters: $open (string) – Error message opening tag $close (string) – Error message closing tag Returns: Error messages Return type: string Returns all detected errors formatted as a string. echo $this->image_lib->display_errors();