Skip to content
Evert Pot edited this page Sep 1, 2014 · 5 revisions

Sabre\VObject\Node

A node is the root class for every element in an iCalendar of vCard object.

  • Class name: Node
  • Namespace: Sabre\VObject
  • This is an abstract class
  • This class implements: IteratorAggregate, ArrayAccess, Countable

Constants

REPAIR

const REPAIR = 1

Properties

$parent

public \Sabre\VObject\Node $parent

Reference to the parent object, if this is not the top object.

  • Visibility: public

$iterator

protected \Sabre\VObject\ElementList $iterator = null

Iterator override

  • Visibility: protected

$root

protected \Sabre\VObject\Component $root

The root document

  • Visibility: protected

Methods

serialize

string Sabre\VObject\Node::serialize()

Serializes the node into a mimedir format

  • Visibility: public
  • This method is abstract.

jsonSerialize

array Sabre\VObject\Node::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.

  • Visibility: public
  • This method is abstract.

getIterator

\Sabre\VObject\ElementList Sabre\VObject\Node::getIterator()

Returns the iterator for this object

  • Visibility: public

setIterator

void Sabre\VObject\Node::setIterator(\Sabre\VObject\ElementList $iterator)

Sets the overridden iterator

Note that this is not actually part of the iterator interface

  • Visibility: public

Arguments

validate

array Sabre\VObject\Node::validate(integer $options)

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.

  • Visibility: public

Arguments

  • $options integer

count

integer Sabre\VObject\Node::count()

Returns the number of elements

  • Visibility: public

offsetExists

boolean Sabre\VObject\Node::offsetExists(integer $offset)

Checks if an item exists through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset integer

offsetGet

mixed Sabre\VObject\Node::offsetGet(integer $offset)

Gets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset integer

offsetSet

void Sabre\VObject\Node::offsetSet(integer $offset, mixed $value)

Sets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset integer
  • $value mixed

offsetUnset

void Sabre\VObject\Node::offsetUnset(integer $offset)

Sets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset integer
Clone this wiki locally