Revert 30130, completely breaks editing with fatal PHP error.
[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
15 const RECOVER_ORIG = 11;
16
17 /**
18 * Create a child frame
19 */
20 function newChild( $args = false, $title = false );
21
22 /**
23 * Expand a document tree node
24 */
25 function expand( $root, $flags = 0 );
26
27 /**
28 * Implode with flags for expand()
29 */
30 function implodeWithFlags( $sep, $flags /*, ... */ );
31
32 /**
33 * Implode with no flags specified
34 */
35 function implode( $sep /*, ... */ );
36
37 /**
38 * Makes an object that, when expand()ed, will be the same as one obtained
39 * with implode()
40 */
41 function virtualImplode( $sep /*, ... */ );
42
43 /**
44 * Virtual implode with brackets
45 */
46 function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
47
48 /**
49 * Returns true if there are no arguments in this frame
50 */
51 function isEmpty();
52
53 function getArgument( $name );
54
55 /**
56 * Returns true if the infinite loop check is OK, false if a loop is detected
57 */
58 function loopCheck( $title );
59 }
60
61 interface PPNode {
62 function getChildren();
63 function getFirstChild();
64 function getNextSibling();
65 function getChildrenOfType( $type );
66 function getLength();
67 function item( $i );
68 function getName();
69
70 function splitArg();
71 function splitExt();
72 function splitHeading();
73 }
74