CI_URI::rsegment()

rsegment($n[, $no_result = NULL]) Parameters: $n (int) – Segment index number $no_result (mixed) – What to return if the searched segment is not found Returns: Routed segment value or $no_result value if not found Return type: mixed This method is identical to segment(), except that it lets you retrieve a specific segment from your re-routed URI in the event you are using CodeIgniter’s URI Routing feature.

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_URI

class CI_URI segment($n[, $no_result = NULL]) Parameters: $n (int) – Segment index number $no_result (mixed) – What to return if the searched segment is not found Returns: Segment value or $no_result value if not found Return type: mixed Permits you to retrieve a specific segment. Where n is the segment number you wish to retrieve. Segments are numbered from left to right. For example, if your full URL is this: http://example.com/index.php/news/local/metro/crime_is_up The segment

CI_Upload::initialize()

initialize([array $config = array()[, $reset = TRUE]]) Parameters: $config (array) – Preferences $reset (bool) – Whether to reset preferences (that are not provided in $config) to their defaults Returns: CI_Upload instance (method chaining) Return type: CI_Upload

CI_Upload::do_upload()

do_upload([$field = 'userfile']) Parameters: $field (string) – Name of the form field Returns: TRUE on success, FALSE on failure Return type: bool Performs the upload based on the preferences you’ve set. Note By default the upload routine expects the file to come from a form field called userfile, and the form must be of type “multipart”. <form method="post" action="some_action" enctype="multipart/form-data" /> If you would like to set your own field name simply pass its va

CI_Upload::display_errors()

display_errors([$open = ' '[, $close = ' ']]) Parameters: $open (string) – Opening markup $close (string) – Closing markup Returns: Formatted error message(s) Return type: string Retrieves any error messages if the do_upload() method returned false. The method does not echo automatically, it returns the data so you can assign it however you need. Formatting Errors By default the above method wraps any errors within <p> tags. You can set your own delimiters like this: $this-&g

CI_Upload::data()

data([$index = NULL]) Parameters: $data (string) – Element to return instead of the full array Returns: Information about the uploaded file Return type: mixed This is a helper method that returns an array containing all of the data related to the file you uploaded. Here is the array prototype: Array ( [file_name] => mypic.jpg [file_type] => image/jpeg [file_path] => /path/to/your/upload/ [full_path] => /path/to/your/upload/

CI_Upload

class CI_Upload initialize([array $config = array()[, $reset = TRUE]]) Parameters: $config (array) – Preferences $reset (bool) – Whether to reset preferences (that are not provided in $config) to their defaults Returns: CI_Upload instance (method chaining) Return type: CI_Upload do_upload([$field = 'userfile']) Parameters: $field (string) – Name of the form field Returns: TRUE on success, FALSE on failure Return type: bool Performs the upload based on the preferences

CI_Unit_test::use_strict()

use_strict([$state = TRUE]) Parameters: $state (bool) – Strict state flag Return type: void Enables/disables strict type comparison in tests.

CI_Unit_test::set_test_items()

set_test_items($items) Parameters: $items (array) – List of visible test items Returns: void Sets a list of items that should be visible in tests. Valid options are: test_name test_datatype res_datatype result file line notes