do_hash()

do_hash($str[, $type = 'sha1']) Parameters: $str (string) – Input $type (string) – Algorithm Returns: Hex-formatted hash Return type: string Permits you to create one way hashes suitable for encrypting passwords. Will use SHA1 by default. See hash_algos() for a full list of supported algorithms. Examples: $str = do_hash($str); // SHA1 $str = do_hash($str, 'md5'); // MD5 Note This function was formerly named dohash(), which has been removed in favor of do_hash(). Note This funct

local_to_gmt()

local_to_gmt([$time = '']) Parameters: $time (int) – UNIX timestamp Returns: UNIX timestamp Return type: int Takes a UNIX timestamp as input and returns it as GMT. Example: $gmt = local_to_gmt(time());

CI_Input::get_post()

get_post($index[, $xss_clean = NULL]) Parameters: $index (string) – GET/POST parameter name $xss_clean (bool) – Whether to apply XSS filtering Returns: GET/POST value if found, NULL if not Return type: mixed This method works the same way as post_get() only it looks for GET data first. $this->input->get_post(‘some_data’, TRUE); Note This method used to act EXACTLY like post_get(), but it’s behavior has changed in CodeIgniter 3.0.

CI_Output::enable_profiler()

enable_profiler([$val = TRUE]) Parameters: $val (bool) – Whether to enable or disable the Profiler Returns: CI_Output instance (method chaining) Return type: CI_Output Permits you to enable/disable the Profiler, which will display benchmark and other data at the bottom of your pages for debugging and optimization purposes. To enable the profiler place the following line anywhere within your Controller methods: $this->output->enable_profiler(TRUE); When enabled a report will b

array_column()

array_column(array $array, $column_key[, $index_key = NULL]) Parameters: $array (array) – Array to fetch results from $column_key (mixed) – Key of the column to return values from $index_key (mixed) – Key to use for the returned values Returns: An array of values representing a single column from the input array Return type: array For more information, please refer to the PHP manual for array_column().

CI_Pagination

class CI_Pagination initialize([$params = array()]) Parameters: $params (array) – Configuration parameters Returns: CI_Pagination instance (method chaining) Return type: CI_Pagination Initializes the Pagination class with your preferred options. create_links() Returns: HTML-formatted pagination Return type: string Returns a “pagination” bar, containing the generated links or an empty string if there’s just a single page.

CI_URI::assoc_to_uri()

assoc_to_uri($array) Parameters: $array (array) – Input array of key/value pairs Returns: URI string Return type: string Takes an associative array as input and generates a URI string from it. The array keys will be included in the string. Example: $array = array('product' => 'shoes', 'size' => 'large', 'color' => 'red'); $str = $this->uri->assoc_to_uri($array); // Produces: product/shoes/size/large/color/red

CI_DB_driver::trans_off()

trans_off() Return type: void Disables transactions at run-time.

CI_Benchmark

class CI_Benchmark mark($name) Parameters: $name (string) – the name you wish to assign to your marker Return type: void Sets a benchmark marker. elapsed_time([$point1 = ''[, $point2 = ''[, $decimals = 4]]]) Parameters: $point1 (string) – a particular marked point $point2 (string) – a particular marked point $decimals (int) – number of decimal places for precision Returns: Elapsed time Return type: string Calculates and returns the time difference between two marked po

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.