Class iCalComponent

Description

A Class for representing components within an iCalendar

Located in /iCalendar.php (line 295)


	
			
Method Summary
 iCalComponent iCalComponent ([ $content = null])
 void AddComponent (iCalComponent $new_component)
 void AddProperty (iCalProp $new_property, [string $value = null], [array $parameters = null])
 void ClearComponents ([string $type = null])
 void ClearProperties ([string $type = null])
 void CollectParameterValues ( $parameter_name)
 array &FirstNonTimezone ([ $type = null])
 array GetComponents ([string $type = null], [boolean $normal_match = true])
 string GetPParamValue (string $type,  $parameter_name)
 void GetProperties ([ $type = null])
 array GetPropertiesByPath ( $path)
 string GetPValue (string $type)
 void GetType ()
 boolean IsAttendee (string $email)
 boolean IsOrganizer (string $email)
 void ParseFrom (string $content)
 void Render ([ $restricted_properties = null])
 void SetComponents (array $new_components, [string $type = null])
 void SetProperties ( $new_properties, [ $type = null])
 void SetType ( $type)
 void UnwrapComponent ( $content)
 void VCalendar ([array $extra_properties = null])
 void WrapComponent ( $content)
Methods
Constructor iCalComponent (line 333)

A basic constructor

iCalComponent iCalComponent ([ $content = null])
  • $content
AddComponent (line 710)

Adds a new subcomponent

void AddComponent (iCalComponent $new_component)
  • iCalComponent $new_component: The new component to append to the set
AddProperty (line 581)

Adds a new property

void AddProperty (iCalProp $new_property, [string $value = null], [array $parameters = null])
  • iCalProp $new_property: The new property to append to the set, or a string with the name
  • string $value: The value of the new property (default: param 1 is an iCalProp with everything
  • array $parameters: The key/value parameter pairs (default: none, or param 1 is an iCalProp with everything)
ClearComponents (line 669)

Clear all components, or the components matching a particular type

void ClearComponents ([string $type = null])
  • string $type: The type of component - omit for all components
ClearProperties (line 544)

Clear all properties, or the properties matching a particular type

void ClearProperties ([string $type = null])
  • string $type: The type of property - omit for all properties
CollectParameterValues (line 364)

Collect an array of all parameters of our properties which are the specified type

Mainly used for collecting the full variety of references TZIDs

void CollectParameterValues ( $parameter_name)
  • $parameter_name
FirstNonTimezone (line 601)

Get all sub-components, or at least get those matching a type

  • return: an array of the sub-components
array &FirstNonTimezone ([ $type = null])
  • $type
GetComponents (line 651)

Get all sub-components, or at least get those matching a type, or failling to match, should the second parameter be set to false.

  • return: an array of the sub-components
array GetComponents ([string $type = null], [boolean $normal_match = true])
  • string $type: The type to match (default: All)
  • boolean $normal_match: Set to false to invert the match (default: true)
GetPParamValue (line 532)

Get the value of the specified parameter for the first property matching the name. Obviously this isn't so useful for properties which may occur multiply, but most don't.

  • return: The value of the parameter for the property, or null in the case that there was no such property, or no such parameter.
string GetPParamValue (string $type,  $parameter_name)
  • string $type: The name of the parameter we are after.
  • $parameter_name
GetProperties (line 498)

Get all properties, or the properties matching a particular type

void GetProperties ([ $type = null])
  • $type
GetPropertiesByPath (line 757)

Return an array of properties matching the specified path

  • return: An array of iCalProp within the tree which match the path given, in the form [/]COMPONENT[/...]/PROPERTY in a syntax kind of similar to our poor man's XML queries. We also allow COMPONENT and PROPERTY to be !COMPONENT and !PROPERTY for ++fun.
array GetPropertiesByPath ( $path)
  • $path
GetPValue (line 516)

Get the value of the first property matching the name. Obviously this isn't so useful for properties which may occur multiply, but most don't.

  • return: The value of the property, or null if there was no such property.
string GetPValue (string $type)
  • string $type: The type of property we are after.
GetType (line 480)

Return the type of component which this is

void GetType ()
IsAttendee (line 632)

Return true if the person identified by the email address is down as an attendee or organizer for this meeting.

  • return: true if we found 'em, false if we didn't.
boolean IsAttendee (string $email)
  • string $email: The e-mail address of the person we're seeking.
IsOrganizer (line 616)

Return true if the person identified by the email address is down as an organizer for this meeting.

  • return: true if we found 'em, false if we didn't.
boolean IsOrganizer (string $email)
  • string $email: The e-mail address of the person we're seeking.
ParseFrom (line 385)

Parse the text $content into sets of iCalProp & iCalComponent within this iCalComponent

void ParseFrom (string $content)
  • string $content: The raw RFC2445-compliant iCalendar component, including BEGIN:TYPE & END:TYPE
Render (line 727)

Renders the component, possibly restricted to only the listed properties

void Render ([ $restricted_properties = null])
  • $restricted_properties
SetComponents (line 698)

Sets some or all sub-components of the component to the supplied new components

void SetComponents (array $new_components, [string $type = null])
  • string $type: The type of components to be replaced. Defaults to null, which means all components will be replaced.
  • array $new_components: of iCalComponent $new_components The new components to replace the existing ones
SetProperties (line 565)

Set all properties, or the ones matching a particular type

void SetProperties ( $new_properties, [ $type = null])
  • $new_properties
  • $type
SetType (line 488)

Set the type of component which this is

void SetType ( $type)
  • $type
UnwrapComponent (line 456)

This unescapes the (CRLF + linear space) wrapping specified in RFC2445. According to RFC2445 we should always end with CRLF but the CalDAV spec says that normalising XML parsers often muck with it and may remove the CR. We accept either case.

void UnwrapComponent ( $content)
  • $content
VCalendar (line 348)

Apply standard properties for a VCalendar

void VCalendar ([array $extra_properties = null])
  • array $extra_properties: Key/value pairs of additional properties
WrapComponent (line 468)

This imposes the (CRLF + linear space) wrapping specified in RFC2445. According to RFC2445 we should always end with CRLF but the CalDAV spec says that normalising XML parsers often muck with it and may remove the CR. We output RFC2445 compliance.

In order to preserve pre-existing wrapping in the component, we split the incoming string on line breaks before running wordwrap over each component of that.

void WrapComponent ( $content)
  • $content

Documentation generated on Tue, 18 Nov 2008 18:08:56 +1300 by phpDocumentor 1.3.2