Completed
Push — stable ( b83837...3c8749 )
by
unknown
08:20 queued 05:46
created

AbstractRewriter::writeCalls()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Parsing\Handler;
4
5
/**
6
 * Basic implementation of the rewriter interface to be specialized by children
7
 */
8
abstract class AbstractRewriter implements ReWriterInterface
9
{
10
    /** @var CallWriterInterface original CallWriter */
11
    protected $callWriter;
12
13
    /** @var array[] list of calls */
14
    public $calls = array();
15
16
    /** @inheritdoc */
17
    public function __construct(CallWriterInterface $callWriter)
18
    {
19
        $this->callWriter = $callWriter;
20
    }
21
22
    /** @inheritdoc */
23
    public function writeCall($call)
24
    {
25
        $this->calls[] = $call;
26
    }
27
28
    /** * @inheritdoc */
29
    public function writeCalls($calls)
30
    {
31
        $this->calls = array_merge($this->calls, $calls);
32
    }
33
34
    /** @inheritDoc */
35
    public function getCallWriter()
36
    {
37
        return $this->callWriter;
38
    }
39
}
40