CI_Cart::insert()

insert([$items = array()]) Parameters: $items (array) – Items to insert into the cart Returns: TRUE on success, FALSE on failure Return type: bool Insert items into the cart and save it to the session table. Returns TRUE on success and FALSE on failure.

CI_Cart::product_options()

product_options([$row_id = '']) Parameters: $row_id (int) – Row ID Returns: Array of product options Return type: array Returns an array of options for a particular product. This method is designed to be used in a loop with contents(), since you must pass the rowid to this method, as shown in the Displaying the Cart example above.

CI_Calendar::parse_template()

parse_template() Returns: CI_Calendar instance (method chaining) Return type: CI_Calendar Harvests the data within the template {pseudo-variables} used to display the calendar.

CI_Cart::destroy()

destroy() Return type: void Permits you to destroy the cart. This method will likely be called when you are finished processing the customer’s order.

CI_Cart

class CI_Cart $product_id_rules = '.a-z0-9_-' These are the regular expression rules that we use to validate the product ID - alpha-numeric, dashes, underscores, or periods by default $product_name_rules = 'w -.:' These are the regular expression rules that we use to validate the product ID and product name - alpha-numeric, dashes, underscores, colons or periods by default $product_name_safe = TRUE Whether or not to only allow safe product names. Default TRUE. insert([$ite

CI_Calendar::get_total_days()

get_total_days($month, $year) Parameters: $month (int) – Month $year (int) – Year Returns: Count of days in the specified month Return type: int Total days in a given month: echo $this->calendar->get_total_days(2, 2012); // 29 Note This method is an alias for Date Helper function days_in_month().

CI_Calendar::initialize()

initialize([$config = array()]) Parameters: $config (array) – Configuration parameters Returns: CI_Calendar instance (method chaining) Return type: CI_Calendar Initializes the Calendaring preferences. Accepts an associative array as input, containing display preferences.

CI_Cart::contents()

contents([$newest_first = FALSE]) Parameters: $newest_first (bool) – Whether to order the array with newest items first Returns: An array of cart contents Return type: array Returns an array containing everything in the cart. You can sort the order by which the array is returned by passing it TRUE where the contents will be sorted from newest to oldest, otherwise it is sorted from oldest to newest.

CI_Calendar::get_month_name()

get_month_name($month) Parameters: $month (int) – Month Returns: Month name Return type: string Generates a textual month name based on the numeric month provided.

CI_Calendar::default_template()

default_template() Returns: An array of template values Return type: array Sets the default template. This method is used when you have not created your own template.