43 return [ [
"foo<bar" ], [
"foo>bar" ], [
"foo\nbar" ], [
"foo\rbar" ] ];
49 $popt->setWrapOutputClass(
false );
60 $parser->setHook( $tag, [ $this,
'tagCallback' ] );
62 "Foo<$tag>Bar</$tag>Baz",
63 Title::newFromText(
'Test' ),
66 $this->assertEquals(
"<p>FooOneBaz\n</p>", $parserOutput->getText() );
79 $parser->setHook( $tag, [ $this,
'tagCallback' ] );
81 "Foo<$tag>Bar</$tag>Baz",
82 Title::newFromText(
'Test' ),
85 $this->fail(
'Exception not thrown.' );
95 $parser->setFunctionTagHook( $tag, [ $this,
'functionTagCallback' ], 0 );
97 "Foo<$tag>Bar</$tag>Baz",
98 Title::newFromText(
'Test' ),
101 $this->assertEquals(
"<p>FooOneBaz\n</p>", $parserOutput->getText() );
116 [ $this,
'functionTagCallback' ],
117 Parser::SFH_OBJECT_ARGS
120 "Foo<$tag>Bar</$tag>Baz",
121 Title::newFromText(
'Test' ),
124 $this->fail(
'Exception not thrown.' );
128 return str_rot13( $text );
132 return str_rot13(
$code );
$wgParserConf
Parser configuration.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
testFunctionTagHooks( $tag)
provideValidNames
tagCallback( $text, $params, $parser)
testBadTagHooks( $tag)
provideBadNames MWException
functionTagCallback(&$parser, $frame, $code, $attribs)
testBadFunctionTagHooks( $tag)
provideBadNames MWException
testTagHooks( $tag)
provideValidNames
static provideValidNames()
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
do that in ParserLimitReportFormat instead $parser
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs