CI_Cart::has_options()

has_options($row_id = '') Parameters: $row_id (int) – Row ID to inspect Returns: TRUE if options exist, FALSE otherwise Return type: bool Returns TRUE (boolean) if a particular row in the cart contains options. 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_Cart::get_item()

get_item($row_id) Parameters: $row_id (int) – Row ID to retrieve Returns: Array of item data Return type: array Returns an array containing data for the item matching the specified row ID, or FALSE if no such item exists.

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::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_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::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_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_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::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::get_day_names()

get_day_names($day_type = '') Parameters: $day_type (string) – ‘long’, ‘short’, or ‘abr’ Returns: Array of day names Return type: array Returns an array of day names (Sunday, Monday, etc.) based on the type provided. Options: long, short, abr. If no $day_type is provided (or if an invalid type is provided) this method will return the “abbreviated” style.