PHP Class CI_Calendar, TastyIgniter

Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$day_type string How to display names of days
$month_type string How to display months
$next_prev_url boolean Url base to use for next/prev month links
$replacements array Replacements array for template
$show_next_prev boolean Whether to show next/prev month links
$show_other_days boolean Show days of other months
$start_day string Day of the week to start the calendar on
$template mixed Calendar layout template

Protected Properties

Свойство Type Description
$CI object CI Singleton

Méthodes publiques

Méthode Description
__construct ( array $config = [] ) : void Class constructor
adjust_date ( $month, $year ) : array Adjust Date
default_template ( ) : array Set Default Template Data
generate ( $year = '', $month = '', $data = [] ) : string Generate the calendar
get_day_names ( $day_type = '' ) : array Get Day Names
get_month_name ( $month ) : string Get Month Name
get_total_days ( $month, $year ) : integer Total days in a given month
initialize ( $config = [] ) : CI_Calendar Initialize the user preferences
parse_template ( ) : CI_Calendar Parse Template

Method Details

__construct() public méthode

Loads the calendar language file and sets the default time reference.
public __construct ( array $config = [] ) : void
$config array Calendar options
Résultat void

adjust_date() public méthode

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 adjust_date ( $month, $year ) : array
Résultat array

default_template() public méthode

This is used in the event that the user has not created their own template
public default_template ( ) : array
Résultat array

generate() public méthode

Generate the calendar
public generate ( $year = '', $month = '', $data = [] ) : string
Résultat string

get_day_names() public méthode

Returns an array of day names (Sunday, Monday, etc.) based on the type. Options: long, short, abr
public get_day_names ( $day_type = '' ) : array
Résultat array

get_month_name() public méthode

Generates a textual month name based on the numeric month provided.
public get_month_name ( $month ) : string
Résultat string

get_total_days() public méthode

Total days in a given month
public get_total_days ( $month, $year ) : integer
Résultat integer

initialize() public méthode

Accepts an associative array as input, containing display preferences
public initialize ( $config = [] ) : CI_Calendar
Résultat CI_Calendar

parse_template() public méthode

Harvests the data within the template {pseudo-variables} used to display the calendar
public parse_template ( ) : CI_Calendar
Résultat CI_Calendar

Property Details

$CI protected_oe property

CI Singleton
protected object $CI
Résultat object

$day_type public_oe property

How to display names of days
public string $day_type
Résultat string

$month_type public_oe property

How to display months
public string $month_type
Résultat string

$next_prev_url public_oe property

Url base to use for next/prev month links
public bool $next_prev_url
Résultat boolean

$replacements public_oe property

Replacements array for template
public array $replacements
Résultat array

$show_next_prev public_oe property

Whether to show next/prev month links
public bool $show_next_prev
Résultat boolean

$show_other_days public_oe property

Show days of other months
public bool $show_other_days
Résultat boolean

$start_day public_oe property

Day of the week to start the calendar on
public string $start_day
Résultat string

$template public_oe property

Calendar layout template
public mixed $template
Résultat mixed