Skip to content

Sabre VObject ElementList

Evert Pot edited this page Jun 6, 2013 · 3 revisions

Sabre\VObject\ElementList

VObject ElementList

This class represents a list of elements. Lists are the result of queries, such as doing $vcalendar->vevent where there's multiple VEVENT objects.

  • Class name: ElementList
  • Namespace: Sabre\VObject
  • This class implements: Iterator, Countable, ArrayAccess

Properties

$elements

protected array $elements = array()

Inner elements

  • Visibility: protected

$key

private int $key

Current position

  • Visibility: private

Methods

__construct

mixed Sabre\VObject\ElementList::__construct(array $elements)

Creates the element list.

  • Visibility: public

Arguments

  • $elements array

current

\Sabre\VObject\Element Sabre\VObject\ElementList::current()

Returns current item in iteration

  • Visibility: public

next

void Sabre\VObject\ElementList::next()

To the next item in the iterator

  • Visibility: public

key

int Sabre\VObject\ElementList::key()

Returns the current iterator key

  • Visibility: public

valid

bool Sabre\VObject\ElementList::valid()

Returns true if the current position in the iterator is a valid one

  • Visibility: public

rewind

void Sabre\VObject\ElementList::rewind()

Rewinds the iterator

  • Visibility: public

count

int Sabre\VObject\ElementList::count()

Returns the number of elements

  • Visibility: public

offsetExists

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

Checks if an item exists through ArrayAccess.

  • Visibility: public

Arguments

  • $offset int

offsetGet

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

Gets an item through ArrayAccess.

  • Visibility: public

Arguments

  • $offset int

offsetSet

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

Sets an item through ArrayAccess.

  • Visibility: public

Arguments

  • $offset int
  • $value mixed

offsetUnset

void Sabre\VObject\ElementList::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