PHP 클래스 CI_Calendar, TastyIgniter

저자: EllisLab Dev Team
파일 보기 프로젝트 열기: tastyigniter/tastyigniter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$CI object CI Singleton

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

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

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 adjust_date ( $month, $year ) : array
리턴 array

default_template() 공개 메소드

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

generate() 공개 메소드

Generate the calendar
public generate ( $year = '', $month = '', $data = [] ) : string
리턴 string

get_day_names() 공개 메소드

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

get_month_name() 공개 메소드

Generates a textual month name based on the numeric month provided.
public get_month_name ( $month ) : string
리턴 string

get_total_days() 공개 메소드

Total days in a given month
public get_total_days ( $month, $year ) : integer
리턴 integer

initialize() 공개 메소드

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

parse_template() 공개 메소드

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

프로퍼티 상세

$CI 보호되어 있는 프로퍼티

CI Singleton
protected object $CI
리턴 object

$day_type 공개적으로 프로퍼티

How to display names of days
public string $day_type
리턴 string

$month_type 공개적으로 프로퍼티

How to display months
public string $month_type
리턴 string

$next_prev_url 공개적으로 프로퍼티

Url base to use for next/prev month links
public bool $next_prev_url
리턴 boolean

$replacements 공개적으로 프로퍼티

Replacements array for template
public array $replacements
리턴 array

$show_next_prev 공개적으로 프로퍼티

Whether to show next/prev month links
public bool $show_next_prev
리턴 boolean

$show_other_days 공개적으로 프로퍼티

Show days of other months
public bool $show_other_days
리턴 boolean

$start_day 공개적으로 프로퍼티

Day of the week to start the calendar on
public string $start_day
리턴 string

$template 공개적으로 프로퍼티

Calendar layout template
public mixed $template
리턴 mixed