CalAddress
CalAddress property.
This object encodes CAL-ADDRESS values, as defined in rfc5545
- Full name:
\Sabre\VObject\Property\ICalendar\CalAddress
- Parent class:
\Sabre\VObject\Property\Text
Properties
delimiter
In case this is a multi-value property. This string will be used as a delimiter.
Methods
getValueType
Returns the type of value.
This corresponds to the VALUE= parameter. Every property also has a 'default' valueType.
getNormalizedValue
This returns a normalized form of the value.
This is primarily used right now to turn mixed-cased schemes in user uris to lower-case.
Evolution in particular tends to encode mailto: as MAILTO:.
Inherited methods
serialize
Turns the object back into a serialized blob.
jsonSerialize
This method returns an array, with the representation as it should be encoded in JSON. This is used to create jCard or jCal documents.
xmlSerialize
This method serializes the data into XML. This is used to create xCard or xCal documents.
Parameters:
Parameter | Type | Description |
---|---|---|
$writer |
\Sabre\Xml\Writer | XML writer |
destroy
Call this method on a document if you're done using it.
It's intended to remove all circular references, so PHP can easily clean it up.
getIterator
Returns the iterator for this object.
setIterator
Sets the overridden iterator.
Note that this is not actually part of the iterator interface
Parameters:
Parameter | Type | Description |
---|---|---|
$iterator |
\Sabre\VObject\ElementList |
validate
Validates the node for correctness.
The following options are supported: - Node::REPAIR - If something is broken, and automatic repair may be attempted.
An array is returned with warnings.
Every item in the array has the following properties: * level - (number between 1 and 3 with severity information) * message - (human readable message) * node - (reference to the offending node)
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
int |
count
Returns the number of elements.
offsetExists
Checks if an array element exists.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
mixed |
offsetGet
Returns a parameter.
If the parameter does not exist, null is returned.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
offsetSet
Creates a new parameter.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | |
$value |
mixed |
offsetUnset
Removes one or more parameters with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
__construct
Creates the property.
public __construct(\Sabre\VObject\Component $root, string $name, string|array|null $value = null, array $parameters = [], string $group = null): mixed
You can specify the parameters either in key=>value syntax, in which case parameters will automatically be created, or you can just pass a list of Parameter objects.
Parameters:
Parameter | Type | Description |
---|---|---|
$root |
\Sabre\VObject\Component | The root document |
$name |
string | |
$value |
string|array|null | |
$parameters |
array | List of parameters |
$group |
string | The vcard property group |
setValue
Updates the current value.
This may be either a single, or multiple strings in an array.
Parameters:
Parameter | Type | Description |
---|---|---|
$value |
string|array |
getValue
Returns the current value.
This method will always return a singular value. If this was a multi-value object, some decision will be made first on how to represent it as a string.
To get the correct multi-value version, use getParts.
setParts
Sets a multi-valued property.
Parameters:
Parameter | Type | Description |
---|---|---|
$parts |
array |
getParts
Returns a multi-valued property.
This method always returns an array, if there was only a single value, it will still be wrapped in an array.
add
Adds a new parameter.
If a parameter with same name already existed, the values will be combined. If nameless parameter is added, we try to guess its name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | |
$value |
string|array|null |
parameters
Returns an iterable list of children.
getValueType
Returns the type of value.
This corresponds to the VALUE= parameter. Every property also has a 'default' valueType.
setRawMimeDirValue
Sets a raw value coming from a mimedir (iCalendar/vCard) file.
This has been 'unfolded', so only 1 line will be passed. Unescaping is not yet done, but parameters are not included.
Parameters:
Parameter | Type | Description |
---|---|---|
$val |
string |
getRawMimeDirValue
Returns a raw mime-dir representation of the value.
getJsonValue
Returns the value, in the format it should be encoded for json.
This method must always return an array.
setJsonValue
Sets the JSON value, as it would appear in a jCard or jCal object.
The value must always be an array.
Parameters:
Parameter | Type | Description |
---|---|---|
$value |
array |
setXmlValue
Hydrate data from a XML subtree, as it would appear in a xCard or xCal object.
Parameters:
Parameter | Type | Description |
---|---|---|
$value |
array |
xmlSerializeValue
This method serializes only the value of a property. This is used to create xCard or xCal documents.
Parameters:
Parameter | Type | Description |
---|---|---|
$writer |
\Sabre\Xml\Writer | XML writer |
__toString
Called when this object is being cast to a string.
If the property only had a single value, you will get just that. In the case the property had multiple values, the contents will be escaped and combined with ,.
__clone
This method is automatically called when the object is cloned.
Specifically, this will ensure all child elements are also cloned.
setQuotedPrintableValue
Sets the value as a quoted-printable encoded string.
Parameters:
Parameter | Type | Description |
---|---|---|
$val |
string |
Automatically generated on 2025-03-18