Skip to content

Sabre VObject ElementList

Evert Pot edited this page Sep 1, 2014 · 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 integer $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

integer Sabre\VObject\ElementList::key()

Returns the current iterator key

  • Visibility: public

valid

boolean 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

integer Sabre\VObject\ElementList::count()

Returns the number of elements

  • Visibility: public

offsetExists

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

Checks if an item exists through ArrayAccess.

  • Visibility: public

Arguments

  • $offset integer

offsetGet

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

Gets an item through ArrayAccess.

  • Visibility: public

Arguments

  • $offset integer

offsetSet

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

Sets an item through ArrayAccess.

  • Visibility: public

Arguments

  • $offset integer
  • $value mixed

offsetUnset

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