Node
A node is the root class for every element in an iCalendar of vCard object.
- Full name:
\Sabre\VObject\Node
- This class implements:
\IteratorAggregate
,\ArrayAccess
,\Countable
,\JsonSerializable
,\Sabre\Xml\XmlSerializable
- This class is an Abstract class
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
REPAIR |
public | 1 | |
PROFILE_CARDDAV |
public | 2 | |
PROFILE_CALDAV |
public | 4 |
Properties
parent
Reference to the parent object, if this is not the top object.
iterator
Iterator override.
root
The root document.
Methods
serialize
Serializes the node into a mimedir format.
- This method is abstract.
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.
- This method is abstract.
xmlSerialize
This method serializes the data into XML. This is used to create xCard or xCal documents.
- This method is abstract.
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 - May attempt to automatically repair the problem.
This method returns an array with detected problems. Every element has the following properties:
- level - problem level.
- message - A human-readable string describing the issue.
- node - A reference to the problematic node.
The level means: 1 - The issue was repaired (only happens if REPAIR was turned on) 2 - An inconsequential issue 3 - A severe issue.
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
int |
count
Returns the number of elements.
offsetExists
Checks if an item exists through ArrayAccess.
This method just forwards the request to the inner iterator
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
int |
offsetGet
Gets an item through ArrayAccess.
This method just forwards the request to the inner iterator
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
int |
offsetSet
Sets an item through ArrayAccess.
This method just forwards the request to the inner iterator
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
int | |
$value |
mixed |
offsetUnset
Sets an item through ArrayAccess.
This method just forwards the request to the inner iterator
Parameters:
Parameter | Type | Description |
---|---|---|
$offset |
int |
Automatically generated on 2025-03-18