xref: /dokuwiki/inc/Parsing/Handler/ReWriterInterface.php (revision be906b566b9bdfd92c032ee07c4fd077d820a8d1)
1*be906b56SAndreas Gohr<?php
2*be906b56SAndreas Gohr
3*be906b56SAndreas Gohrnamespace dokuwiki\Parsing\Handler;
4*be906b56SAndreas Gohr
5*be906b56SAndreas Gohr/**
6*be906b56SAndreas Gohr * A ReWriter takes over from the orignal call writer and handles all new calls itself until
7*be906b56SAndreas Gohr * the process method is called and control is given back to the original writer.
8*be906b56SAndreas Gohr */
9*be906b56SAndreas Gohrinterface ReWriterInterface extends CallWriterInterface
10*be906b56SAndreas Gohr{
11*be906b56SAndreas Gohr
12*be906b56SAndreas Gohr    /**
13*be906b56SAndreas Gohr     * ReWriterInterface constructor.
14*be906b56SAndreas Gohr     *
15*be906b56SAndreas Gohr     * This rewriter will be registered as the new call writer in the Handler.
16*be906b56SAndreas Gohr     * The original is passed as parameter
17*be906b56SAndreas Gohr     *
18*be906b56SAndreas Gohr     * @param CallWriterInterface $callWriter the original callwriter
19*be906b56SAndreas Gohr     */
20*be906b56SAndreas Gohr    public function __construct(CallWriterInterface $callWriter);
21*be906b56SAndreas Gohr
22*be906b56SAndreas Gohr    /**
23*be906b56SAndreas Gohr     * Process any calls that have been added and add them to the
24*be906b56SAndreas Gohr     * original call writer
25*be906b56SAndreas Gohr     *
26*be906b56SAndreas Gohr     * @return CallWriterInterface the orignal call writer
27*be906b56SAndreas Gohr     */
28*be906b56SAndreas Gohr    public function process();
29*be906b56SAndreas Gohr}
30