Completed
Pull Request — 3.x (#200)
by
unknown
06:29 queued 03:16
created

IteratorProxyMessageIterator::rewind()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\NotificationBundle\Iterator;
13
14
/**
15
 * @author Toni Uebernickel <[email protected]>
16
 */
17
class IteratorProxyMessageIterator implements MessageIteratorInterface
18
{
19
    /**
20
     * @var \Iterator
21
     */
22
    protected $iterator;
23
24
    /**
25
     * @param \Iterator $iterator
26
     */
27
    public function __construct(\Iterator $iterator)
28
    {
29
        $this->iterator = $iterator;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function current()
36
    {
37
        return $this->iterator->current();
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function next()
44
    {
45
        $this->iterator->next();
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function key()
52
    {
53
        return $this->iterator->key();
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function valid()
60
    {
61
        return $this->iterator->valid();
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function rewind()
68
    {
69
        $this->iterator->rewind();
70
    }
71
}
72