CI_DB_utility::csv_from_result()

csv_from_result($query[, $delim = ', '[, $newline = "n"[, $enclosure = '"']]]) Parameters: $query (object) – A database result object $delim (string) – The CSV field delimiter to use $newline (string) – The newline character to use $enclosure (string) – The enclosure delimiter to use Returns: The generated CSV file as a string Return type: string Translates a database result object into a CSV document.

CI_FTP::changedir()

changedir($path[, $suppress_debug = FALSE]) Parameters: $path (string) – Directory path $suppress_debug (bool) – Whether to turn off debug messages for this command Returns: TRUE on success, FALSE on failure Return type: bool Changes the current working directory to the specified path. The $suppress_debug parameter is useful in case you want to use this method as an is_dir() alternative for FTP.

CI_Output::set_status_header()

set_status_header([$code = 200[, $text = '']]) Parameters: $code (int) – HTTP status code $text (string) – Optional message Returns: CI_Output instance (method chaining) Return type: CI_Output Permits you to manually set a server status header. Example: $this->output->set_status_header(401); // Sets the header as: Unauthorized See here for a full list of headers. Note This method is an alias for Common function set_status_header().

CI_Encrypt::encode_from_legacy()

encode_from_legacy($string[, $legacy_mode = MCRYPT_MODE_ECB[, $key = '']]) Parameters: $string (string) – String to encrypt $legacy_mode (int) – Valid PHP MCrypt cipher constant $key (string) – Encryption key Returns: Newly encrypted string Return type: string Enables you to re-encode data that was originally encrypted with CodeIgniter 1.x to be compatible with the Encrypt library in CodeIgniter 2.x. It is only necessary to use this method if you have encrypted data stored permane

form_textarea()

form_textarea([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML textarea tag Return type: string This function is identical in all respects to the form_input() function above except that it generates a “textarea” type. Note Instead of the maxlength and size attributes in the above example, you wi

get_instance()

get_instance() Returns: Reference to your controller’s instance Return type: CI_Controller

CI_Unit_test::result()

result([$results = array()]) Parameters: $results (array) – Tests results list Returns: Array of raw result data Return type: array Returns raw tests results data.

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_Security

class CI_Security xss_clean($str[, $is_image = FALSE]) Parameters: $str (mixed) – Input string or an array of strings Returns: XSS-clean data Return type: mixed Tries to remove XSS exploits from the input data and returns the cleaned string. If the optional second parameter is set to true, it will return boolean TRUE if the image is safe to use and FALSE if malicious data was detected in it. sanitize_filename($str[, $relative_path = FALSE]) Parameters: $str (string) – File

CI_DB_driver::table_exists()

table_exists($table_name) Parameters: $table_name (string) – The table name Returns: TRUE if that table exists, FALSE if not Return type: bool Determine if a particular table exists.