* @ingroup Parser
*/
class CoreParserFunctions {
+ /**
+ * @static
+ * @param $parser Parser
+ * @return void
+ */
static function register( $parser ) {
global $wgAllowDisplayTitle, $wgAllowSlowParserFunctions;
* to the link cache, so the local cache here should be unnecessary, but
* in fact calling getLength() repeatedly for the same $page does seem to
* run one query for each call?
+ * @param $parser Parser
*/
static function pagesize( $parser, $page = '', $raw = null ) {
static $cache = array();
return self::pad( $string, $length, $padding );
}
+ /**
+ * @static
+ * @param $parser Parser
+ * @param $text
+ * @return string
+ */
static function anchorencode( $parser, $text ) {
return substr( $parser->guessSectionNameFromWikiText( $text ), 1);
}
}
}
+ /**
+ * @static
+ * @param $parser Parser
+ * @param $text
+ * @return string
+ */
public static function defaultsort( $parser, $text ) {
$text = trim( $text );
if( strlen( $text ) == 0 )
* @ingroup Parser
*/
class CoreTagHooks {
+ /**
+ * @static
+ * @param $parser Parser
+ * @return void
+ */
static function register( $parser ) {
global $wgRawHtml, $wgUseTeX;
$parser->setHook( 'pre', array( __CLASS__, 'pre' ) );
return $wgContLang->armourMath( MathRenderer::renderMath( $content, $attributes, $parser->getOptions() ) );
}
+ /**
+ * @static
+ * @param $content
+ * @param $attributes
+ * @param $parser Parser
+ * @return
+ */
static function gallery( $content, $attributes, $parser ) {
return $parser->renderImageGallery( $content, $attributes );
}
/**
* Merge another LinkHolderArray into this one
+ * @param $other LinkHolderArray
*/
function merge( $other ) {
foreach ( $other->internals as $ns => $entries ) {
}
}
+ /**
+ * @param $parser Parser
+ * @return bool
+ */
function onClearState( &$parser ) {
// hack marker prefixes to get identical output
if ( !isset( $this->dtUniqPrefix ) ) {