Class: vCalEvent
- Package: saf.Date
- Author: John Luxford <lux@simian.ca>
- Copyright: Copyright (C) 2001-2003, Simian Systems Inc.
- License: http://www.sitellite.org/index/license Simian Open Software License
- Version: 1.0, 2002-08-28, $Id: vCalEvent.php,v 1.3 2007/10/06 00:06:30 lux Exp $
- Access: public
vCalEvent contains individual events for the vCal package.
Usage Example
<?php
$cal = new vCal ();
$cal->addProperty ('VERSION', '2.0');
$cal->addProperty ('PRODID', '-//Simian Systems//NONSGML Sitellite Application Framework//EN');
$event =& $cal->addEvent ('VEVENT');
$event->addProperty ('UID', 54321);
$event->addProperty ('ORGANIZER', 'MAILTO:bananaman@simian.ca');
$prop =& $event->addProperty ('ATTENDEE', 'MAILTO:bananaman@simian.ca');
$prop->addParameter ('RSVP', 'TRUE');
// start time is now
$event->addProperty ('DTSTART', date ('Ymd\THis\Z'));
// end time is the same time tomorrow
$event->addProperty ('DTEND', date ('Ymd\THis\Z', time () + 86400));
$event->addProperty ('SUMMARY', 'Party time!');
$event->addProperty ('LOCATION', 'My place');
echo $cal->write ();
?>
Properties
$dayLinks = false
- Access: public
Link pattern for days.
$showPeriod
- Access: public
Tells the calendar what to display on a single screen. May be
'day', 'week', or 'month'.
$beginWeekOn
- Access: public
Tells the calendar what day of the week to start the calendar
on. Value may be one of 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri',
and 'Sat'.
$firstDay
- Access: public
Contains the date (Y-m-d format) of the first day to include
in the current calendar view.
$currentDay
- Access: public
Contains the current date (Y-m-d format).
$lastDay
- Access: public
Contains the date (Y-m-d format) of the last day to include
in the current calendar view.
$showFromHour = 0
- Access: public
Tells Calendar to limit the hours displayed in 'day' view.
Must be an integer from 0 to 23.
$showToHour = 23
- Access: public
Tells Calendar to limit the hours displayed in 'day' view.
Must be an integer from 0 to 23.
$activeCells = array ()
- Access: public
Contains a list of the active cells in the Calendar
matrix. Active cells are the days that are in use.
$cellTemplate
- Access: public
Contains a default template for use in each cell. The
cell template is not to be confused with the item template,
which displays an individual item on any given day.
$topBlock
- Access: public
Reference to the cell that contains the space before
the first day of the month in the 'month' $showPeriod.
$bottomBlock
- Access: public
Reference to the cell that contains the space after
the last day of the month in the 'month' $showPeriod.
$error
- Access: public
If an error has occured within this class, you'll
find it in $error.
$originalData
- Access: public
If this vCal object has been created from an existing data source,
this property contains the original data string.
$events = array ()
- Access: public
List of events in this calendar. All events are vCalEvent objects.
$properties = array ()
- Access: public
List of properties in this event. All properties are
vCalProperty objects.
$calendars = false
- Access: public
List of calendars in this calendar container. All calendars are
vCal objects. A vCal object may act as either a calendar or as a container
of multiple calendars. This property is false if this is not a container.
$tag = 'VCALENDAR'
- Access: public
This is the name of the surrounding BEGIN and END tag. It defaults
to 'VCALENDAR', but can be changed to support additional formats such as
'VCARD'.
$type
- Access: public
The type of event. Can be any of the valid vCalendar
event types.
Methods
vCalEvent ($type = 'VEVENT', $properties = array ())
- Access: public
Constructor Method.
&addProperty ($name, $value, $parameters = array ())
- Access: public
- Return: object reference
Adds a property to the list. Returns a reference to the new
property object. The $name can be any valid vCalendar property.
write ()
- Access: public
- Return: string
Writes the event portion of a message out of the current
object.
