Completed
Push — 3.x-dev-kit ( cc4dbe )
by
unknown
03:15
created

MessageManagerMessageIterator::getBuffer()   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\Tests\Iterator;
13
14
use Doctrine\Common\Persistence\ManagerRegistry;
15
use Sonata\NotificationBundle\Iterator\MessageManagerMessageIterator as Iterator;
16
use Sonata\NotificationBundle\Tests\Entity\MessageManagerMock;
17
18
/**
19
 * @author Kevin Nedelec <[email protected]>
20
 *
21
 * Class MessageManagerMessageIterator
22
 */
23
class MessageManagerMessageIterator extends Iterator
24
{
25
    public function __construct(ManagerRegistry $registry, $pause = 0, $batchSize = 10)
26
    {
27
        parent::__construct(
28
            new MessageManagerMock('Sonata\NotificationBundle\Model\Message', $registry),
29
            array(),
30
            $pause,
31
            $batchSize);
32
    }
33
34
    /**
35
     * @param array $types
36
     */
37
    public function _bufferize($types = array())
38
    {
39
        $this->bufferize($types);
40
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function getBuffer()
46
    {
47
        return $this->buffer;
48
    }
49
}
50