My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Data Fields
CI_Calendar Class Reference

Public Member Functions

 __construct ($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 ()
 

Data Fields

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

Constructor & Destructor Documentation

__construct (   $config = array())

Constructor

Loads the calendar language file and sets the default time reference

Member Function Documentation

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
integerthe month
integerthe year
Returns
array
default_template ( )

Set Default Template Data

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

public

Returns
array
generate (   $year = '',
  $month = '',
  $data = array() 
)

Generate the calendar

public

Parameters
integerthe year
integerthe month
arraythe data to be shown in the calendar cells
Returns
string
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
get_month_name (   $month)

Get Month Name

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

public

Parameters
integerthe month
Returns
string
get_total_days (   $month,
  $year 
)

Total days in a given month

public

Parameters
integerthe month
integerthe year
Returns
integer
initialize (   $config = array())

Initialize the user preferences

Accepts an associative array as input, containing display preferences

public

Parameters
arrayconfig preferences
Returns
void
parse_template ( )

Parse Template

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

public

Returns
void

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