Methods |
public
|
__construct(
Component $root,
string $name,
string|array|null $value = null,
array $parameters = [],
string $group = null,
)
Creates the generic property.
Creates the generic property.
Parameters must be specified in key=>value syntax.
Parameters
$root |
The root document
|
$parameters |
List of parameters
|
$group |
The vcard property group
|
Overriden by
|
#
|
public
|
setValue(string|array $value)
Updates the current value.
Updates the current value.
This may be either a single, or multiple strings in an array.
Overriden by
|
#
|
public
|
getValue(): string
Returns the current value.
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.
Overriden by
|
#
|
public
|
setParts(array $parts)
Sets a multi-valued property.
Sets a multi-valued property.
Overriden by
|
#
|
public
|
getParts(): array
Returns a multi-valued property.
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.
Overriden by
|
#
|
public
|
add(string $name, string|array|null $value = null)
Adds a new parameter.
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.
|
#
|
public
|
parameters(): array
Returns an iterable list of children.
Returns an iterable list of children.
Overriden by
|
#
|
abstract
public
|
getValueType(): string
Returns the type of value.
Returns the type of value.
This corresponds to the VALUE= parameter. Every property also has a
'default' valueType.
Implemented by
|
#
|
abstract
public
|
setRawMimeDirValue(string $val)
Sets a raw value coming from a mimedir (iCalendar/vCard) file.
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.
Implemented by
|
#
|
abstract
public
|
getRawMimeDirValue(): string
Returns a raw mime-dir representation of the value.
Returns a raw mime-dir representation of the value.
Implemented by
|
#
|
public
|
serialize(): string
Turns the object back into a serialized blob.
Turns the object back into a serialized blob.
Overriden by
Implements
|
#
|
public
|
getJsonValue(): array
Returns the value, in the format it should be encoded for JSON.
Returns the value, in the format it should be encoded for JSON.
This method must always return an array.
Overriden by
|
#
|
public
|
setJsonValue(array $value)
Sets the JSON value, as it would appear in a jCard or jCal object.
Sets the JSON value, as it would appear in a jCard or jCal object.
The value must always be an array.
Overriden by
|
#
|
public
|
jsonSerialize(): array
This method returns an array, with the representation as it should be
encoded in JSON. This is used to create jCard or…
This method returns an array, with the representation as it should be
encoded in JSON. This is used to create jCard or jCal documents.
Implements
|
#
|
public
|
setXmlValue(array $value)
Hydrate data from a XML subtree, as it would appear in a xCard or xCal
object.
Hydrate data from a XML subtree, as it would appear in a xCard or xCal
object.
Overriden by
|
#
|
public
|
xmlSerialize(Writer $writer): void
This method serializes the data into XML. This is used to create xCard or
xCal documents.
This method serializes the data into XML. This is used to create xCard or
xCal documents.
Parameters
Implements
|
#
|
public
|
__toString(): string
Called when this object is being cast to a string.
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 ,.
|
#
|
public
|
offsetExists(mixed $name): bool
Checks if an array element exists.
Checks if an array element exists.
Overrides
|
#
|
public
|
offsetGet(string $name): Node
Returns a parameter.
Returns a parameter.
If the parameter does not exist, null is returned.
Overrides
|
#
|
public
|
offsetSet(string $name, mixed $value)
Creates a new parameter.
|
#
|
public
|
offsetUnset(string $name)
Removes one or more parameters with the specified name.
Removes one or more parameters with the specified name.
Overrides
|
#
|
public
|
__clone()
This method is automatically called when the object is cloned.
Specifically, this will ensure all child elements are…
This method is automatically called when the object is cloned.
Specifically, this will ensure all child elements are also cloned.
|
#
|
public
|
validate(int $options = 0): array
Validates the node for correctness.
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)
Overrides
Overriden by
|
#
|
public
|
destroy()
Call this method on a document if you're done using it.
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.
Overrides
|
#
|