1<?php
2
3namespace dokuwiki\Parsing\Handler;
4
5/**
6 * A ReWriter takes over from the orignal call writer and handles all new calls itself until
7 * the process method is called and control is given back to the original writer.
8 *
9 * @property array[] $calls The list of current calls
10 */
11interface ReWriterInterface extends CallWriterInterface
12{
13    /**
14     * ReWriterInterface constructor.
15     *
16     * This rewriter will be registered as the new call writer in the Handler.
17     * The original is passed as parameter
18     *
19     * @param CallWriterInterface $callWriter the original callwriter
20     */
21    public function __construct(CallWriterInterface $callWriter);
22
23    /**
24     * Process any calls that have been added and add them to the
25     * original call writer
26     *
27     * @return CallWriterInterface the orignal call writer
28     */
29    public function process();
30
31    /**
32     * Accessor for this rewriter's original CallWriter
33     *
34     * @return CallWriterInterface
35     */
36    public function getCallWriter();
37}
38