Surebert wikisurebert home | autogenerated toolkit docs | toolkit examples | Log in

Framework:sb ICalendar

From Surebert wiki

Contents

Overview

sb_ICalendar consists of three classes Attendee, Event and Organizer that allow you to create/delete calendar events that work with Outlook, mail.app, iphone, blackberry and Entourage.

Examples

Adding Event

php code

$event = new sb_ICalendar_Event();
$event->location = '901 Washington #3';
$event->summary = 'Ride for Roswell Meeting';
$event->set_time('11/26/2009 13:30', '11/26/2009 14:30');
$event->add_attendee(new sb_ICalendar_Attendee('Reid, Delmar', 'del.reid@roswellpark.org'));
$event->add_attendee(new sb_ICalendar_Attendee('Dean, Gregary', 'gregary.dean@roswellpark.org'));
$event->set_organizer(new sb_ICalendar_Organizer('Visco, Paul', 'paul.visco@roswellpark.org'));
$event->send()

Deleting Event

php code

$event = new sb_ICalendar_Event();
$event->uid = '123'
$event->status = 'CANCEL'
$event->location = '901 Washington #3';
$event->summary = 'Ride for Roswell Meeting';
$event->set_time('11/26/2009 13:30', '11/26/2009 14:30');
$event->add_attendee(new sb_ICalendar_Attendee('Reid, Delmar', 'del.reid@roswellpark.org'));
$event->add_attendee(new sb_ICalendar_Attendee('Dean, Gregary', 'gregary.dean@roswellpark.org'));
$event->set_organizer(new sb_ICalendar_Organizer('Visco, Paul', 'paul.visco@roswellpark.org'));
$event->send();

Same as the Adding event example with the addition of two properties

Class Properties

$this->summary

This will be the body of the email sent. The first twenty characters will be the subject of the message.

$this->location

Location where the event is going to take place

$this->method

Determines what type of event is sent out. The only two that are supported right now are:

$this->uid

Unique identifier for calendar event. This needs to be provided if you are canceling an event. If it is not provided it is set when an event is sent out.

$this->dtstart

Start time of the event in any format strtotime() can handle

$this->dtend

End time of the event in any format strtotime() can handle

$this->attendees

An array of sb_ICalendar_Attendee objects that are the attendees for the event

$this->organizer

The organizer of the event as an sb_ICalendar_Organizer

Retrieved from "http://wiki.surebert.com/index.php/Framework:sb_ICalendar"

This page has been accessed 118 times. This page was last modified on 29 January 2010, at 16:02. Content is available under Attribution-Noncommercial-Share Alike 3.0 Unported.


Browse
Home
Toolkit
Framework
Application
Recent changes
Random page
Edit
View source
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
More...