PA_Calendar
in package
Creates HTML monthly calendars with day-based events.
Table of Contents
- $date : object
- The current active calendar date.
- $day : int
- The current active calendar day. Defaults to `today`.
- $events : array<string|int, mixed>
- An array containing all notable calendar events.
- $month : int
- The current calendar integer month.
- $month_name : string
- The current calendar month name.
- $wday : int
- The current active calendar week day. Defaults to the name weekday.
- $weeks : int
- The current weeks available in the current calendar.
- $year : int
- The current calendar year.
- __construct() : mixed
- Initializes a puzzle calendar. Defaults to the current month.
- has_events() : int
- Denotes how many events the current calendar has.
- set_event() : null
- Sets an event for the calendar
- set_events() : null
- Sets events for the calendar.
Properties
$date
The current active calendar date.
public
object
$date
The current active calendar date.
$day
The current active calendar day. Defaults to `today`.
public
int
$day
The current active calendar day. Defaults to today.
$events
An array containing all notable calendar events.
public
array<string|int, mixed>
$events
An array containing all notable calendar events.
$month
The current calendar integer month.
public
int
$month
The current calendar integer month.
$month_name
The current calendar month name.
public
string
$month_name
The current calendar month name.
$wday
The current active calendar week day. Defaults to the name weekday.
public
int
$wday
The current active calendar week day. Defaults to the name weekday.
$weeks
The current weeks available in the current calendar.
public
int
$weeks
The current weeks available in the current calendar.
$year
The current calendar year.
public
int
$year
The current calendar year.
Methods
__construct()
Initializes a puzzle calendar. Defaults to the current month.
public
__construct([int|null $year = NULL ][, int|null $month = NULL ][, int|null $day = NULL ]) : mixed
Parameters
- $year : int|null = NULL
- $month : int|null = NULL
- $day : int|null = NULL
Return values
mixed —has_events()
Denotes how many events the current calendar has.
public
has_events() : int
Return values
int —The number of calendar events.
set_event()
Sets an event for the calendar
public
set_event(PA_Calendar_Event $event) : null
Parameters
- $event : PA_Calendar_Event
-
A calendar event.
Return values
null —set_events()
Sets events for the calendar.
public
set_events(array<string|int, PA_Calendar_Event> $events) : null
Parameters
- $events : array<string|int, PA_Calendar_Event>
-
A collection of events to assign to the calendar.