[[start]]
 

qCal iCalendar Library for PHP5

qCal is an open-source, object-oriented, iCalendar library for PHP5. It is written using common design patterns and best practices. As of right now, the latest version is 0.0.2.

Installation

iCalendar v2.0

qCal is a direct implementation of the iCalendar 2.0 specification. If you aren't familiar with the specification, I would recommend you at least glance over the following section before attempting to work with qCal. qCal assumes at least a rudimentary understanding of the spec. I will do my best to summarize it here, but it is an extremely long and complex specification, so to completely explain it would be beyond the scope of this documentation. The specification will always be the best possible reference. And if all else fails, contact me directly and I will do my best to help you.

Understanding the specifics of iCalendar's syntax and grammar is not necessary in order to use this library, but as I stated before, it would be in your interest to at least glance over the rules for syntax and grammer in the specification.

Rather than explain the specification itself, I am going to explain how qCal's various components relate to the specification, starting with value types.

API Reference

Once you have a decent understanding of what components, properties, parameters and value types are (by reading the section above), you can finally start learning the ins and outs of working with them in this library. I wouldn't spend too much time reading about all of those things though. Working with the library is definitely the easiest way to learn them.

The following section is meant as a reference guide to all of the important classes within this library.

Dates and Times

qCal comes packaged with a mini-library capable of doing some pretty nifty things with dates and times. It consists of:

  • qCal_Date - Use this class when you need only a date and not a time. Example: “1986-04-23”
  • qCal_Timezone - Use this class to apply a timezone offset to any of the time components. Example: “PST (UTC -8 hours)”
  • qCal_Time - Use this class when you need only a time and not a date. Example: “08:30:00”
  • qCal_DateTime - Use this class when you need a date and a time. Example: “1986-04-23 08:30:00 PST”
  • qCal_Datetime_Duration - Use this class to represent a duration of time. Example: “four weeks, three days and 5 hours”
  • qCal_DateTime_Period - Use this class to represent a period in time. Example: “From April 23rd, 2008 to April 26th, 2008”
  • qCal_DateTime_Recur - Use this class to represent a date/time recurrence pattern. Example: “Yearly on April 23rd at 4:00pm” or “Every third Tuesday of April and May from now until five years from now”

Components

qCal_Component

This class and its descendants are used in qCal to represent iCalendar components. Each of the component types defined in the iCalendar specification has a corresponding class in qCal. In the iCalendar specification, component names are prefixed with a “V”, which is a remnant of the old vCalendar spec that came before it. The only exceptions are with sub-components. The VTIMEZONE component has two sub-components which do not have the “V” prefix (STANDARD and DAYLIGHT)

All of the following components work in the same basic manner, so first read about the qCal_Component base class and then read about the specific classes below.

Base qCal_Component class

Component Properties

This section will describe how to work with component properties.

Component Property Parameters

This section will describe how to work with component property parameters.

Value Types

This section will describe how to work with value types.

Parsing iCalendar Files

This section will describe how to work with parsers.

Rendering qCal Components

This section will describe how to work with renderers.

 
/home/luke/dokuwiki/data/pages/start.txt · Last modified: 2010/01/20 22:48 by luke
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki