CI_Calendar Class Reference

List of all members.

Public Member Functions

 CI_Calendar ($config=array())
 initialize ($config=array())
 generate ($year= '', $month= '', $data=array())
 get_month_name ($month)
 get_day_names ($day_type= '')
 adjust_date ($month, $year)
 get_total_days ($month, $year)
 default_template ()
 parse_template ()

Public Attributes

 $CI
 $lang
 $local_time
 $template = ''
 $start_day = 'sunday'
 $month_type = 'long'
 $day_type = 'abr'
 $show_next_prev = FALSE
 $next_prev_url = ''


Member Function Documentation

CI_Calendar::adjust_date ( month,
year 
)

Adjust Date

This function makes sure that we have a valid month/year. For example, if you submit 13 as the month, the year will increment and the month will become January.

public

Parameters:
integer the month
integer the year
Returns:
array

CI_Calendar::CI_Calendar ( config = array()  ) 

Constructor

Loads the calendar language file and sets the default time reference

public

CI_Calendar::default_template (  ) 

Set Default Template Data

This is used in the event that the user has not created their own template

public

Returns:
array

CI_Calendar::generate ( year = '',
month = '',
data = array() 
)

Generate the calendar

public

Parameters:
integer the year
integer the month
array the data to be shown in the calendar cells
Returns:
string

CI_Calendar::get_day_names ( day_type = ''  ) 

Get Day Names

Returns an array of day names (Sunday, Monday, etc.) based on the type. Options: long, short, abrev

public

Parameters:
string 
Returns:
array

CI_Calendar::get_month_name ( month  ) 

Get Month Name

Generates a textual month name based on the numeric month provided.

public

Parameters:
integer the month
Returns:
string

CI_Calendar::get_total_days ( month,
year 
)

Total days in a given month

public

Parameters:
integer the month
integer the year
Returns:
integer

CI_Calendar::initialize ( config = array()  ) 

Initialize the user preferences

Accepts an associative array as input, containing display preferences

public

Parameters:
array config preferences
Returns:
void

CI_Calendar::parse_template (  ) 

Parse Template

Harvests the data within the template {pseudo-variables} used to display the calendar

public

Returns:
void


Member Data Documentation

CI_Calendar::$CI

CI_Calendar::$day_type = 'abr'

CI_Calendar::$lang

CI_Calendar::$local_time

CI_Calendar::$month_type = 'long'

CI_Calendar::$next_prev_url = ''

CI_Calendar::$show_next_prev = FALSE

CI_Calendar::$start_day = 'sunday'

CI_Calendar::$template = ''


The documentation for this class was generated from the following file:

Generated on Sun Nov 16 16:09:07 2008 for CodeIgniter by  doxygen 1.5.7.1