Skip to content
Evert Pot edited this page Jun 6, 2013 · 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 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(int $options)

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)

  • Visibility: public

Arguments

  • $options int

count

int Sabre\VObject\Node::count()

Returns the number of elements

  • Visibility: public

offsetExists

bool Sabre\VObject\Node::offsetExists(int $offset)

Checks if an item exists through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset int

offsetGet

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

Gets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset int

offsetSet

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

Sets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset int
  • $value mixed

offsetUnset

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

Sets an item through ArrayAccess.

This method just forwards the request to the inner iterator

  • Visibility: public

Arguments

  • $offset int

Clone this wiki locally