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