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.

CI_Calendar::adjust_date()

adjust_date($month, $year) Parameters: $month (int) – Month $year (int) – Year Returns: An associative array containing month and year Return type: array This method makes sure that you have a valid month/year. For example, if you submit 13 as the month, the year will increment and the month will become January: print_r($this->calendar->adjust_date(13, 2014)); outputs: Array ( [month] => '01' [year] => '2015' )

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.

CI_Calendar::generate()

generate([$year = ''[, $month = ''[, $data = array()]]]) Parameters: $year (int) – Year $month (int) – Month $data (array) – Data to be shown in the calendar cells Returns: HTML-formatted calendar Return type: string Generate the calendar.

CI_Cache::get()

get($id) Parameters: $id (string) – Cache item name Returns: Item value or FALSE if not found Return type: mixed This method will attempt to fetch an item from the cache store. If the item does not exist, the method will return FALSE. $foo = $this->cache->get('my_cached_item');

CI_Cache::increment()

increment($id[, $offset = 1]) Parameters: $id (string) – Cache ID $offset (int) – Step/value to add Returns: New value on success, FALSE on failure Return type: mixed Performs atomic incrementation of a raw stored value. // 'iterator' has a value of 2 $this->cache->increment('iterator'); // 'iterator' is now 3 $this->cache->increment('iterator', 3); // 'iterator' is now 6

CI_Cache::save()

save($id, $data[, $ttl = 60[, $raw = FALSE]]) Parameters: $id (string) – Cache item name $data (mixed) – the data to save $ttl (int) – Time To Live, in seconds (default 60) $raw (bool) – Whether to store the raw value Returns: TRUE on success, FALSE on failure Return type: string This method will save an item to the cache store. If saving fails, the method will return FALSE. $this->cache->save('cache_item_id', 'data_to_cache'); Note The $raw parameter is only utilized by

CI_Cache::is_supported()

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('my_cache'))

CI_Cache::delete()

delete($id) Parameters: $id (string) – name of cached item Returns: TRUE on success, FALSE on failure Return type: bool This method will delete a specific item from the cache store. If item deletion fails, the method will return FALSE. $this->cache->delete('cache_item_id');

CI_Cache::get_metadata()

get_metadata($id) Parameters: $id (string) – Cache item name Returns: Metadata for the cached item Return type: mixed This method will return detailed information on a specific item in the cache. var_dump($this->cache->get_metadata('my_cached_item')); Note The information returned and the structure of the data is dependent on which adapter is being used.