1 | <?php |
||
11 | class Nest implements ReWriterInterface |
||
12 | { |
||
13 | |||
14 | /** @var CallWriterInterface original CallWriter */ |
||
15 | protected $callWriter; |
||
16 | |||
17 | protected $calls = array(); |
||
18 | protected $closingInstruction; |
||
19 | |||
20 | /** |
||
21 | * @inheritdoc |
||
22 | * |
||
23 | * @param CallWriterInterface $CallWriter the parser's current call writer, i.e. the one above us in the chain |
||
24 | * @param string $close closing instruction name, this is required to properly terminate the |
||
25 | * syntax mode if the document ends without a closing pattern |
||
26 | */ |
||
27 | public function __construct(CallWriterInterface $CallWriter, $close = "nest_close") |
||
33 | |||
34 | /** @inheritdoc */ |
||
35 | public function writeCall($call) |
||
39 | |||
40 | /** @inheritdoc */ |
||
41 | public function writeCalls($calls) |
||
45 | |||
46 | /** @inheritdoc */ |
||
47 | public function finalise() |
||
56 | |||
57 | /** @inheritdoc */ |
||
58 | public function process() |
||
71 | |||
72 | protected function addCall($call) |
||
83 | } |
||
84 |