CallWriter.php 819 B

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