CI_Trackback::set_error()

set_error($msg) Parameters: $msg (string) – Error message Return type: void Set an log an error message.

CI_Cache

class CI_Cache is_supported($driver) Parameters: $driver (string) – the name of the caching driver Returns: TRUE if supported, FALSE if not Return type: bool This method is automatically called when accessing drivers via $this->cache->get(). However, if the individual drivers are used, make sure to call this method to ensure the driver is supported in the hosting environment. if ($this->cache->apc->is_supported()) { if ($data = $this->cache->apc->get

ellipsize()

ellipsize($str, $max_length[, $position = 1[, $ellipsis = '…']]) Parameters: $str (string) – Input string $max_length (int) – String length limit $position (mixed) – Position to split at (int or float) $ellipsis (string) – What to use as the ellipsis character Returns: Ellipsized string Return type: string This function will strip tags from a string, split it at a defined maximum length, and insert an ellipsis. The first parameter is the string to ellipsize, the second is the num

CI_User_agent::charsets()

charsets() Returns: An array list of accepted character sets Return type: array Returns an array of character sets accepted by the user agent.

CI_DB_driver::field_exists()

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

Creating Drivers

Driver Directory and File Structure Sample driver directory and file structure layout: /application/libraries/Driver_nameDriver_name.php driversDriver_name_subclass_1.php Driver_name_subclass_2.php Driver_name_subclass_3.php Note In order to maintain compatibility on case-sensitive file systems, the Driver_name directory must be named in the format returned by ucfirst(). Note The Driver library’s architecture is such that the subclasses don’t extend and therefore don’t inherit properties

CI_Trackback::extract_urls()

extract_urls($urls) Parameters: $urls (string) – Comma-separated URL list Returns: Array of URLs Return type: array This method lets multiple trackbacks to be sent. It takes a string of URLs (separated by comma or space) and puts each URL into an array.

CI_DB_query_builder::reset_query()

reset_query() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Resets the current Query Builder state. Useful when you want to build a query that can be cancelled under certain conditions.

CI_Image_lib

class CI_Image_lib initialize([$props = array()]) Parameters: $props (array) – Image processing preferences Returns: TRUE on success, FALSE in case of invalid settings Return type: bool Initializes the class for processing an image. resize() Returns: TRUE on success, FALSE on failure Return type: bool The image resizing method lets you resize the original image, create a copy (with or without resizing), or create a thumbnail image. For practical purposes there is no differenc

CI_DB_driver::last_query()

last_query() Returns: The last query executed Return type: string Returns the last query that was executed.