xref: /dokuwiki/inc/Parsing/Handler/ReWriterInterface.php (revision 3213bf4e5dd55220bd7614bf0030e6e680b4c227)
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 */
9interface ReWriterInterface extends CallWriterInterface
10{
11
12    /**
13     * ReWriterInterface constructor.
14     *
15     * This rewriter will be registered as the new call writer in the Handler.
16     * The original is passed as parameter
17     *
18     * @param CallWriterInterface $callWriter the original callwriter
19     */
20    public function __construct(CallWriterInterface $callWriter);
21
22    /**
23     * Process any calls that have been added and add them to the
24     * original call writer
25     *
26     * @return CallWriterInterface the orignal call writer
27     */
28    public function process();
29}
30