2008-01-21 16:36:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
|
|
|
|
* @ingroup Parser
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
interface Preprocessor {
|
2008-02-18 07:45:44 +00:00
|
|
|
/** Create a new preprocessor object based on an initialised Parser object */
|
2008-01-21 16:36:08 +00:00
|
|
|
function __construct( $parser );
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/** Create a new top-level frame for expansion of a page */
|
2008-01-21 16:36:08 +00:00
|
|
|
function newFrame();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
2008-06-26 13:05:40 +00:00
|
|
|
/** Create a new custom frame for programmatic use of parameter replacement as used in some extensions */
|
|
|
|
|
function newCustomFrame( $args );
|
|
|
|
|
|
2008-02-18 07:45:44 +00:00
|
|
|
/** Preprocess text to a PPNode */
|
2008-01-21 16:36:08 +00:00
|
|
|
function preprocessToObj( $text, $flags = 0 );
|
|
|
|
|
}
|
|
|
|
|
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
|
|
|
|
* @ingroup Parser
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
interface PPFrame {
|
|
|
|
|
const NO_ARGS = 1;
|
|
|
|
|
const NO_TEMPLATES = 2;
|
|
|
|
|
const STRIP_COMMENTS = 4;
|
|
|
|
|
const NO_IGNORE = 8;
|
2008-01-25 04:14:51 +00:00
|
|
|
const RECOVER_COMMENTS = 16;
|
2008-01-21 16:36:08 +00:00
|
|
|
|
2008-01-25 04:14:51 +00:00
|
|
|
const RECOVER_ORIG = 27; // = 1|2|8|16 no constant expression support in PHP yet
|
2008-01-21 16:36:08 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a child frame
|
|
|
|
|
*/
|
|
|
|
|
function newChild( $args = false, $title = false );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Expand a document tree node
|
|
|
|
|
*/
|
|
|
|
|
function expand( $root, $flags = 0 );
|
2008-04-14 07:45:50 +00:00
|
|
|
|
2008-01-21 16:36:08 +00:00
|
|
|
/**
|
|
|
|
|
* Implode with flags for expand()
|
|
|
|
|
*/
|
|
|
|
|
function implodeWithFlags( $sep, $flags /*, ... */ );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implode with no flags specified
|
|
|
|
|
*/
|
|
|
|
|
function implode( $sep /*, ... */ );
|
|
|
|
|
|
|
|
|
|
/**
|
2008-04-14 07:45:50 +00:00
|
|
|
* Makes an object that, when expand()ed, will be the same as one obtained
|
2008-01-21 16:36:08 +00:00
|
|
|
* with implode()
|
2008-04-14 07:45:50 +00:00
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function virtualImplode( $sep /*, ... */ );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Virtual implode with brackets
|
|
|
|
|
*/
|
|
|
|
|
function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns true if there are no arguments in this frame
|
|
|
|
|
*/
|
|
|
|
|
function isEmpty();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
2009-07-02 16:21:30 +00:00
|
|
|
/**
|
|
|
|
|
* Returns all arguments of this frame
|
|
|
|
|
*/
|
|
|
|
|
function getArguments();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns all numbered arguments of this frame
|
|
|
|
|
*/
|
|
|
|
|
function getNumberedArguments();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns all named arguments of this frame
|
|
|
|
|
*/
|
|
|
|
|
function getNamedArguments();
|
|
|
|
|
|
2008-02-18 07:45:44 +00:00
|
|
|
/**
|
2008-04-14 07:45:50 +00:00
|
|
|
* Get an argument to this frame by name
|
2008-02-18 07:45:44 +00:00
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getArgument( $name );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns true if the infinite loop check is OK, false if a loop is detected
|
|
|
|
|
*/
|
|
|
|
|
function loopCheck( $title );
|
2008-01-30 02:55:19 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return true if the frame is a template frame
|
|
|
|
|
*/
|
|
|
|
|
function isTemplate();
|
2008-01-21 16:36:08 +00:00
|
|
|
}
|
|
|
|
|
|
2008-02-18 07:45:44 +00:00
|
|
|
/**
|
|
|
|
|
* There are three types of nodes:
|
|
|
|
|
* * Tree nodes, which have a name and contain other nodes as children
|
|
|
|
|
* * Array nodes, which also contain other nodes but aren't considered part of a tree
|
|
|
|
|
* * Leaf nodes, which contain the actual data
|
|
|
|
|
*
|
|
|
|
|
* This interface provides access to the tree structure and to the contents of array nodes,
|
2008-04-14 07:45:50 +00:00
|
|
|
* but it does not provide access to the internal structure of leaf nodes. Access to leaf
|
2008-02-18 07:45:44 +00:00
|
|
|
* data is provided via two means:
|
|
|
|
|
* * PPFrame::expand(), which provides expanded text
|
|
|
|
|
* * The PPNode::split*() functions, which provide metadata about certain types of tree node
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Parser
|
2008-02-18 07:45:44 +00:00
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
interface PPNode {
|
2008-04-14 07:45:50 +00:00
|
|
|
/**
|
2008-02-18 07:45:44 +00:00
|
|
|
* Get an array-type node containing the children of this node.
|
|
|
|
|
* Returns false if this is not a tree node.
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getChildren();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the first child of a tree node. False if there isn't one.
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getFirstChild();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the next sibling of any node. False if there isn't one
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getNextSibling();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all children of this tree node which have a given name.
|
|
|
|
|
* Returns an array-type node, or false if this is not a tree node.
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getChildrenOfType( $type );
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the length of the array, or false if this is not an array-type node
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getLength();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns an item of an array-type node
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function item( $i );
|
2008-02-18 07:45:44 +00:00
|
|
|
|
2008-04-14 07:45:50 +00:00
|
|
|
/**
|
2008-02-18 07:45:44 +00:00
|
|
|
* Get the name of this node. The following names are defined here:
|
|
|
|
|
*
|
|
|
|
|
* h A heading node.
|
|
|
|
|
* template A double-brace node.
|
|
|
|
|
* tplarg A triple-brace node.
|
|
|
|
|
* title The first argument to a template or tplarg node.
|
|
|
|
|
* part Subsequent arguments to a template or tplarg node.
|
|
|
|
|
* #nodelist An array-type node
|
|
|
|
|
*
|
|
|
|
|
* The subclass may define various other names for tree and leaf nodes.
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function getName();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Split a <part> node into an associative array containing:
|
|
|
|
|
* name PPNode name
|
|
|
|
|
* index String index
|
2008-04-14 07:45:50 +00:00
|
|
|
* value PPNode value
|
2008-02-18 07:45:44 +00:00
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function splitArg();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Split an <ext> node into an associative array containing name, attr, inner and close
|
|
|
|
|
* All values in the resulting array are PPNodes. Inner and close are optional.
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function splitExt();
|
2008-02-18 07:45:44 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Split an <h> node
|
|
|
|
|
*/
|
2008-01-21 16:36:08 +00:00
|
|
|
function splitHeading();
|
|
|
|
|
}
|