MediaWiki  REL1_31
Go to the documentation of this file.
1 <?php
8  public function preSaveTransform( $text, Title $title, User $user,
9  ParserOptions $options, $clearState = true
10  ) {
11  return $text;
12  }
14  public function parse(
16  $linestart = true, $clearState = true, $revid = null
17  ) {
18  return new ParserOutput;
19  }
20 }
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:247
Set options of the Parser.
Definition: ParserOptions.php:40
Definition: ParserOutput.php:25
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:37
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:964
parse( $text, Title $title, ParserOptions $options, $linestart=true, $clearState=true, $revid=null)
Definition: ParserTestMockParser.php:14
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 & $options
Definition: hooks.txt:2001
preSaveTransform( $text, Title $title, User $user, ParserOptions $options, $clearState=true)
Definition: ParserTestMockParser.php:8
A parser used during article insertion which does nothing, to avoid unnecessary log noise and other i...
Definition: ParserTestMockParser.php:7
Represents a title within MediaWiki.
Definition: Title.php:39
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:53