icalvcb Class Reference

List of all members.

Detailed Description

Simple Vcalendar Component Buffer.

This buffer can be used to collect Vcalendar Elements (VElts) like VEvent and VTodo and manipulate them as a collection.

Basic operations supported are:

Note:
currently this is basically a simple wrapper around Horde_iCalendar.

the Vcalendar Component Buffer will --as the name already says-- only contains Vcalendar Components, that is VEVENTs, VTODOs etc. If you try to add it a full compound VCALENDAR element to it, using the add_velt() method, this will be decomposed in all its components and these will be added to the VCB.

jvl
Version:
0.9.37-a2


Public Member Functions

boolean add_velt (VElt &$vobj)
 Add a single Vcal Element to the VCB.
int add_velts (array_of_VElt &$vobjs)
 Add Multiple Vcal Elements to the VCB.
boolean clear ()
 Remove all Vcal Elements from the VCB.
int count ()
 Deliver number of Velts in buffer (on first level).
array_of_VElts I false find_velts (VEltType $vtype='all')
 Find Vcal Elements in the VCB of a specific type.
int I false parse_vcal (VcalStr &$vcal)
 Parse Vcalstring into a Vcal Elements and add these to buffer.
Vcalstr I false render_vcal (array &$vcal_attributes)
 Render all Vcal Elements from the ICB as one big VcalString.
VElt I false to_velt ()
 Deliver all Velts in buffer as a single icalendar element.

Private Member Functions

 icalvcb ()
 constructor, Initialize the buffer


Constructor & Destructor Documentation

icalvcb::icalvcb  )  [private]
 

constructor, Initialize the buffer


Member Function Documentation

boolean icalvcb::add_velt VElt &$  vobj  ) 
 

Add a single Vcal Element to the VCB.

Note:
when the Vcalendar object to be added is a full compound VCALENDAR element then this element will be decomposed in all its components and these will be added to the VCB.
Parameters:
$vobj a Vcal object that is added to the buffer
Returns:
true if all went oke

int icalvcb::add_velts array_of_VElt &$  vobjs  ) 
 

Add Multiple Vcal Elements to the VCB.

A convenience wrapper around add_velt() to handle multiple Vcal Elements at once.

Parameters:
$vobjs a list of Vcal objects that are added to the buffer
Returns:
number of objects added.

boolean icalvcb::clear  ) 
 

Remove all Vcal Elements from the VCB.

Returns:
true if all went oke

int icalvcb::count  ) 
 

Deliver number of Velts in buffer (on first level).

Returns:
the number of (first level)velts in the buffer

array_of_VElts I false icalvcb::find_velts VEltType $  vtype = 'all'  ) 
 

Find Vcal Elements in the VCB of a specific type.

Parameters:
$vtype class name of a specific Vcal Element: 'VCALENDAR', 'VTODO', 'VEVENT' etc. Default is the special type ALL that will deliver all VElts in the buffer.
Returns:
the list of all Vcal Elements found in the VCB of the given type. Note that the search is only carried out between the top Vcal Elements: no search for sub vcal elements within others is done! When nothing found an empty array is returned. On error false is returned.

int I false icalvcb::parse_vcal VcalStr &$  vcal  ) 
 

Parse Vcalstring into a Vcal Elements and add these to buffer.

Note:
this function uses the egwical_resourcehandler parse routine parse_vcal2velt()
Parameters:
$vcal a iCalendar formatted string with a Vcalendar Element
Returns:
the nof created Vcal Elements On error: false

Vcalstr I false icalvcb::render_vcal array &$  vcal_attributes  ) 
 

Render all Vcal Elements from the ICB as one big VcalString.

Note this function uses the egwical_resourcehandler render routine render_velt2vcal() so that the attributes processing is done

Parameters:
$vcal_attributes hash of attributes to be set in the rendered Vcal string
Returns:
the rendered Vcal formatted string. On error: false

VElt I false icalvcb::to_velt  ) 
 

Deliver all Velts in buffer as a single icalendar element.

Warning:
the returned VCALENDAR is a reference to the actual buffer, not a clone, so later changes onto the buffer will propagate in the returned obj.
Returns:
all the velts from the buffer wrapped in a container VCALENDAR object. On error false is delivered.


The documentation for this class was generated from the following file:
Generated on Thu Jun 8 21:57:23 2006 for EgwIcal by  doxygen 1.4.6