Overview

Packages

  • awl
    • AuthPlugin
    • AwlDatabase
    • Browser
    • classEditor
    • DataEntry
    • DataUpdate
    • EMail
    • iCalendar
    • MenuSet
    • PgQuery
    • Session
    • Translation
    • User
    • Utilities
    • Validation
    • vCalendar
    • vComponent
    • XMLDocument
    • XMLElement
  • None

Classes

  • iCalComponent
  • iCalendar
  • iCalProp
  • Overview
  • Package
  • Class

Class iCalendar

A Class for handling Events on a calendar (DEPRECATED)

Package: awl\iCalendar
Copyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at iCalendar.php
Methods summary
public
# iCalendar( $args )

Deprecated:

This class will be removed soon. The constructor takes an array of args. If there is an element called 'icalendar' then that will be parsed into the iCalendar object. Otherwise the array elements are converted into properties of the iCalendar object directly.


public
# SaveTimeZones( )

Deprecated:

This class will be removed soon. Save any timezones by TZID in the PostgreSQL database for future re-use.


public
# DefaultPropertyList( )

An array of property names that we should always want when rendering an iCalendar

An array of property names that we should always want when rendering an iCalendar

Deprecated:

This class will be removed soon.
public string
# JustThisBitPlease( $type, $count = 1 )

A function to extract the contents of a BEGIN:SOMETHING to END:SOMETHING (perhaps multiply) and return just that bit (or, of course, those bits :-)

A function to extract the contents of a BEGIN:SOMETHING to END:SOMETHING (perhaps multiply) and return just that bit (or, of course, those bits :-)

Returns

string
A string from BEGIN:SOMETHING to END:SOMETHING, possibly multiple of these

Deprecated:

This class will be removed soon.

Var

string The type of thing(s) we want returned.
integer The number of SOMETHINGS we want to get.
public arrayref &
# ParseSomeLines( $type )

Function to parse lines from BEGIN:SOMETHING to END:SOMETHING into a nested array structure

Function to parse lines from BEGIN:SOMETHING to END:SOMETHING into a nested array structure

Returns

arrayref
An array of the things we found between (excluding) the BEGIN & END, some of which might be sub-arrays

Deprecated:

This class will be removed soon.

Var

string The "SOMETHING" from the BEGIN:SOMETHING line we just met
public
# BuildFromText( $icalendar )

Build the iCalendar object from a text string which is a single iCalendar resource

Build the iCalendar object from a text string which is a single iCalendar resource

Deprecated:

This class will be removed soon.

Var

string The RFC2445 iCalendar resource to be parsed
public string
# RFC2445ContentUnescape( string $escaped )

Returns a content string with the RFC2445 escaping removed

Returns a content string with the RFC2445 escaping removed

Parameters

$escaped
The incoming string to be escaped.

Returns

string
The string with RFC2445 content escaping removed.

Deprecated:

This class will be removed soon.
public
# DealWithTimeZones( )

Do what must be done with time zones from on file. Attempt to turn them into something that PostgreSQL can understand...

Do what must be done with time zones from on file. Attempt to turn them into something that PostgreSQL can understand...

Deprecated:

This class will be removed soon.
public
# Get( $key )

Get the value of a property in the first non-VTIMEZONE

Get the value of a property in the first non-VTIMEZONE

Deprecated:

This class will be removed soon.
public
# Set( $key, $value )

Set the value of a property

Set the value of a property

Deprecated:

This class will be removed soon.
public
# Add( string $key, string $value, string $parameters = null )

Parameters

$key
The property key
$value
The property value
$parameters
Any parameters to set for the property, as an array of key/value pairs

Deprecated:

This class will be removed soon. Add a new property/value, regardless of whether it exists already


public array
# GetComponents( string $type = null, boolean $normal_match = true )

Parameters

$type
The type to match (default: All)
$normal_match
Set to false to invert the match (default: true)

Returns

array
an array of the sub-components

Deprecated:

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


public
# ClearComponents( string $type = null )

Parameters

$type
The type of component - omit for all components

Deprecated:

This class will be removed soon. Clear all components, or the components matching a particular type


public
# SetComponents( array $new_component, string $type = null )

Parameters

$new_component
iCalComponent $new_components The new components to replace the existing ones
$type
The type of components to be replaced. Defaults to null, which means all components will be replaced.

Deprecated:

This class will be removed soon. Sets some or all sub-components of the component to the supplied new components


public
# AddComponent( iCalComponent $new_component )

Parameters

$new_component
The new component to append to the set

Deprecated:

This class will be removed soon. Adds a new subcomponent


public
# MaskComponents( array $keep )

Parameters

$keep
An array of component types to be kept

Deprecated:

This class will be removed soon. Mask components, removing any that are not of the types in the list


public static
# HttpDateFormat( )

Deprecated:

This class will be removed soon. Returns a PostgreSQL Date Format string suitable for returning HTTP (RFC2068) dates Preferred is "Sun, 06 Nov 1994 08:49:37 GMT" so we do that.


public static
# SqlDateFormat( )

Deprecated:

This class will be removed soon. Returns a PostgreSQL Date Format string suitable for returning iCal dates


public static
# SqlUTCFormat( )

Deprecated:

This class will be removed soon. Returns a PostgreSQL Date Format string suitable for returning dates which have been cast to UTC


public static
# SqlDurationFormat( )

Deprecated:

This class will be removed soon. Returns a PostgreSQL Date Format string suitable for returning iCal durations - this doesn't work for negative intervals, but events should not have such!


public
# RFC2445ContentEscape( string $name, string $value )

Deprecated

This function is deprecated and will be removed eventually.

Parameters

$name
The incoming name[;param] prefixing the string.
$value
The incoming string to be escaped.

Deprecated:

This class will be removed soon. Returns a suitably escaped RFC2445 content string.


public array
# ExtractSubComponent( array $component, string $type, integer $count = 9999 )

Parameters

$component
The component to be parsed
$type
The type of sub-components to be extracted
$count
The number of sub-components to extract (default: 9999)

Returns

array
The sub-component lines

Deprecated:

This class will be removed soon. Return all sub-components of the given type, which are part of the component we pass in as an array of lines.


public array
# ExtractProperty( array $component, string $type, $count = 9999 )

Parameters

$component
An array of lines of this component
$type
The type of parameter
$count

Returns

array
An array of iCalProperty objects

Deprecated:

This class will be removed soon. Extract a particular property from the provided component. In doing so we assume that the content was unescaped when iCalComponent::ParseFrom() called iCalComponent::UnwrapComponent().


public boolean
# ApplyFilter( array $filter, mixed $value )

Parameters

$filter
An array of XMLElement defining the filter(s)
$value
Either a string which is the single property, or an array of lines, for the component.

Returns

boolean
Whether the filter passed / failed.

Deprecated:

This class will be removed soon. Applies the filter conditions, possibly recursively, to the value which will be either a single property, or an array of lines of the component under test.


public boolean
# TestFilter( array $filters )

Parameters

$filters
$filter An array of XMLElement defining the filter

Returns

boolean
Whether or not this iCalendar passes the test

Deprecated:

This class will be removed soon. Test a PROP-FILTER or COMP-FILTER and return a true/false COMP-FILTER (is-defined | is-not-defined | (time-range?, prop-filter*, comp-filter)) PROP-FILTER (is-defined | is-not-defined | ((time-range | text-match)?, param-filter))


public static
# iCalHeader( )

Deprecated:

This class will be removed soon. Returns the header we always use at the start of our iCalendar resources


public static
# iCalFooter( )

Deprecated:

This class will be removed soon. Returns the footer we always use at the finish of our iCalendar resources


public
# Render( boolean $as_calendar = true, string $type = null, array $restrict_properties = null )

Parameters

$as_calendar
Whether or not to wrap the event in a VCALENDAR
$type
The type of iCalendar object (VEVENT, VTODO, VFREEBUSY etc.)
$restrict_properties
The names of the properties we want in our rendered result.

Deprecated:

This class will be removed soon. Render the iCalendar object as a text string which is a single VEVENT (or other)


Properties summary
public iCalendar::$component $component

The component-ised version of the iCalendar

The component-ised version of the iCalendar

#
public iCalendar::$properties $properties

An array of arbitrary properties, containing arbitrary arrays of arbitrary properties

An array of arbitrary properties, containing arbitrary arrays of arbitrary properties

#
public iCalendar::$lines $lines

An array of the lines of this iCalendar resource

An array of the lines of this iCalendar resource

#
public iCalendar::$tz_locn $tz_locn

The typical location name for the standard timezone such as "Pacific/Auckland"

The typical location name for the standard timezone such as "Pacific/Auckland"

#
public iCalendar::$type $type

The type of iCalendar data VEVENT/VTODO/VJOURNAL

The type of iCalendar data VEVENT/VTODO/VJOURNAL

#
API documentation generated by ApiGen