1<?php 2 3namespace dokuwiki\Parsing\Handler; 4 5class CallWriter implements CallWriterInterface 6{ 7 /** @var \Doku_Handler $Handler */ 8 protected $Handler; 9 10 /** 11 * @param \Doku_Handler $Handler 12 */ 13 public function __construct(\Doku_Handler $Handler) 14 { 15 $this->Handler = $Handler; 16 } 17 18 /** @inheritdoc */ 19 public function writeCall($call) 20 { 21 $this->Handler->calls[] = $call; 22 } 23 24 /** @inheritdoc */ 25 public function writeCalls($calls) 26 { 27 $this->Handler->calls = array_merge($this->Handler->calls, $calls); 28 } 29 30 /** 31 * @inheritdoc 32 * function is required, but since this call writer is first/highest in 33 * the chain it is not required to do anything 34 */ 35 public function finalise() 36 { 37 unset($this->Handler); 38 } 39} 40