55 $this->name = strtoupper(
$name);
59 $this->name = static::guessParameterNameByValue(
$value);
65 if ($this->name ===
'') {
66 $this->noName =
false;
67 $this->name = strtoupper(
$value);
86 switch (strtoupper(
$value)) {
90 case 'QUOTED-PRINTABLE' :
199 if (is_array($this->value)) {
200 return implode(
',', $this->value);
229 if (is_array($this->value)) {
231 } elseif (is_null($this->value)) {
251 if (is_null($this->value)) {
252 $this->value = $part;
254 $this->value = array_merge((array)$this->value, (array)$part);
274 array_map(
'strtolower', (array)$this->value)
289 return $this->name .
'=';
294 return implode(
';',
$value);
298 return $this->name .
'=' . array_reduce(
300 function(
$out, $item) {
320 if (!preg_match(
'#(?: [\n":;\^,\+] )#x', $item)) {
363 foreach (explode(
',', $this->value) as
$value) {
364 $writer->writeElement(
'text', $value);
387 if (!is_null($this->iterator))
390 return $this->iterator =
new ArrayIterator((array)$this->value);
iCalendar/vCard/jCal/jCard/xCal/xCard writer object.
jsonSerialize()
This method returns an array, with the representation as it should be encoded in JSON.
getIterator()
Returns the iterator for this object.
getParts()
Returns all values for this parameter.
setParts(array $value)
Sets multiple values for this parameter.
getValue()
Returns the current value.
xmlSerialize(Xml\Writer $writer)
This method serializes the data into XML.
A node is the root class for every element in an iCalendar of vCard object.
addValue($part)
Adds a value to this parameter.
__toString()
Called when this object is being cast to a string.
count()
Returns the number of elements.
has($value)
Checks if this parameter contains the specified value.
__construct(Document $root, $name, $value=null)
Sets up the object.
static guessParameterNameByValue($value)
Try to guess property name by value, can be used for vCard 2.1 nameless parameters.
serialize()
Turns the object back into a serialized blob.
setValue($value)
Updates the current value.