fix html regression: missing id attribute on wpReason input box on deletion forms
[lhc/web/wiklou.git] / includes / Preprocessor.php
1 <?php
2
3 interface Preprocessor {
4 function __construct( $parser );
5 function newFrame();
6 function preprocessToObj( $text, $flags = 0 );
7 }
8
9 interface PPFrame {
10 const NO_ARGS = 1;
11 const NO_TEMPLATES = 2;
12 const STRIP_COMMENTS = 4;
13 const NO_IGNORE = 8;
14 const RECOVER_COMMENTS = 16;
15
16 const RECOVER_ORIG = 27; // = 1|2|8|16 no constant expression support in PHP yet
17
18 /**
19 * Create a child frame
20 */
21 function newChild( $args = false, $title = false );
22
23 /**
24 * Expand a document tree node
25 */
26 function expand( $root, $flags = 0 );
27
28 /**
29 * Implode with flags for expand()
30 */
31 function implodeWithFlags( $sep, $flags /*, ... */ );
32
33 /**
34 * Implode with no flags specified
35 */
36 function implode( $sep /*, ... */ );
37
38 /**
39 * Makes an object that, when expand()ed, will be the same as one obtained
40 * with implode()
41 */
42 function virtualImplode( $sep /*, ... */ );
43
44 /**
45 * Virtual implode with brackets
46 */
47 function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
48
49 /**
50 * Returns true if there are no arguments in this frame
51 */
52 function isEmpty();
53
54 function getArgument( $name );
55
56 /**
57 * Returns true if the infinite loop check is OK, false if a loop is detected
58 */
59 function loopCheck( $title );
60
61 /**
62 * Return true if the frame is a template frame
63 */
64 function isTemplate();
65 }
66
67 interface PPNode {
68 function getChildren();
69 function getFirstChild();
70 function getNextSibling();
71 function getChildrenOfType( $type );
72 function getLength();
73 function item( $i );
74 function getName();
75
76 function splitArg();
77 function splitExt();
78 function splitHeading();
79 }
80