Represents a contentline token.
ContentLines in iCalendar mostly represent properties, but sometimes indicate the start/end of a component.
Located in /contentline.php (line 105)
| Class | Description |
|---|---|
| PhpiCalLib_PropertyFactory | The factory class for creating the right kind of PhpiCalLib_ContentLine objects. |
| PhpiCalLib_Properties_TextProperty | Many properties specify a value of type "text". This base class can be used for those. |
| PhpiCalLib_Properties_UnencodedProperty | For properties that require no encoding of the value. |
Regex to capture validate an iana-token
Regex to validate a name token
A quick regular expression to validate the name token ==> name = iana-token / x-name iana-token = 1*(ALPHA / DIGIT / "-") x-name = "X-" [vendorid "-"] 1*(ALPHA / DIGIT / "-") vendorid = 3*(ALPHA / DIGIT) ==> name = 1*(ALPHA / DIGIT / "-") / "X-" [3*(ALPHA / DIGIT) "-"] 1*(ALPHA / DIGIT / "-") ==> name = 1*(ALPHA / DIGIT / "-")
The "param" tokens
Info about which parameters are permitted for this property
Empty array means all parameters are permitted. Each entry is keyed by id. The values indicate the min and max number of instances. For example, the spec says this for ATTENDEE. http://tools.ietf.org/html/draft-ietf-calsify-rfc2445bis-08#section-3.8.4.1
attparam = *(
; the following are OPTIONAL,
; but MUST NOT occur more than once
(";" cutypeparam) / (";" memberparam) /
(";" roleparam) / (";" partstatparam) /
(";" rsvpparam) / (";" deltoparam) /
(";" delfromparam) / (";" sentbyparam) /
(";" cnparam) / (";" dirparam) /
(";" languageparam) /
; the following is OPTIONAL,
; and MAY occur more than once
(";" other-param)
)This would be implemented as:
Note that this mechanism isn't sufficient to ensure the property only has valid parameters, for example two parameters may be mutually exclusive. Where that is the case the user should override (@link AddParameterPermitted()}, RemoveParameterPermitted or SetParameterPermitted to make sure that any remaining rules have been followed.
The "value" token
The "name" token
An enumerated version of $Name
Convert a property type to it's defined name
Convert a property name to it's defined type
Constructor
Determine if the given parameter is permitted for addition
Parse a contentline from the unfolded string, returning the new object
Create a new ContentLine object
A component would override this class, providing a new version of this function in order to choose the right kind of class to create. The alternative is to create a generic ContentLine object, then us Copy() to establish the specialised version, but it's better to create the right object up front.
Access the property value as an encoded value
Get the name of the property
Get the parameter of the given name, returning a single PhpiCalLib object
If there are multiple parameters of the given name, it will just return the first
Access the parameters
Access the property type
Note this will return PHPICALLIB_PROPERTY_IANAPROP or PHPICALLIB_PROPERTY_XPROP for properties that it doesn't recognize.
Removes all parameters of the given name
Determine if we are allowed to remove the given parameter
Sets the property value by specifying the encoded value
Set the new name for the property
Removes all existing parameters of the given name, and adds the given parameter
Determine if the given parameter can be changed
Set the parameters
Set the type of the content line
Convert a string to a list of content lines
Convert the content line to a string
Documentation generated on Tue, 01 Apr 2008 00:20:02 +0100 by phpDocumentor 1.4.0