1<?php
2
3namespace Sabre\VObject;
4
5use ArrayIterator;
6use LogicException;
7
8/**
9 * VObject ElementList.
10 *
11 * This class represents a list of elements. Lists are the result of queries,
12 * such as doing $vcalendar->vevent where there's multiple VEVENT objects.
13 *
14 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
15 * @author Evert Pot (http://evertpot.com/)
16 * @license http://sabre.io/license/ Modified BSD License
17 */
18class ElementList extends ArrayIterator {
19
20
21    /* {{{ ArrayAccess Interface */
22
23    /**
24     * Sets an item through ArrayAccess.
25     *
26     * @param int $offset
27     * @param mixed $value
28     *
29     * @return void
30     */
31    function offsetSet($offset, $value) {
32
33        throw new LogicException('You can not add new objects to an ElementList');
34
35    }
36
37    /**
38     * Sets an item through ArrayAccess.
39     *
40     * This method just forwards the request to the inner iterator
41     *
42     * @param int $offset
43     *
44     * @return void
45     */
46    function offsetUnset($offset) {
47
48        throw new LogicException('You can not remove objects from an ElementList');
49
50    }
51
52    /* }}} */
53
54}
55