MediaWiki  REL1_31
Go to the documentation of this file.
1 <?php
3 use RemexHtml\Tokenizer\Attributes;
4 use RemexHtml\Tokenizer\TokenHandler;
5 use RemexHtml\Tokenizer\Tokenizer;
10 class RemexStripTagHandler implements TokenHandler {
11  private $text = '';
12  public function getResult() {
13  return $this->text;
14  }
16  function startDocument( Tokenizer $t, $fns, $fn ) {
17  // Do nothing.
18  }
19  function endDocument( $pos ) {
20  // Do nothing.
21  }
22  function error( $text, $pos ) {
23  // Do nothing.
24  }
25  function characters( $text, $start, $length, $sourceStart, $sourceLength ) {
26  $this->text .= substr( $text, $start, $length );
27  }
28  function startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength ) {
29  // Do nothing.
30  }
31  function endTag( $name, $sourceStart, $sourceLength ) {
32  // Do nothing.
33  }
34  function doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength ) {
35  // Do nothing.
36  }
37  function comment( $text, $sourceStart, $sourceLength ) {
38  // Do nothing.
39  }
40 }
error( $text, $pos)
Definition: RemexStripTagHandler.php:22
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
Definition: APACHE-LICENSE-2.0.txt:10
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:18
endTag( $name, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:31
comment( $text, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:37
Definition: RemexStripTagHandler.php:10
characters( $text, $start, $length, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:25
startDocument(Tokenizer $t, $fns, $fn)
Definition: RemexStripTagHandler.php:16
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
Definition: RemexStripTagHandler.php:11
doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:34
startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:28
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:302
Definition: testCompression.php:69
endDocument( $pos)
Definition: RemexStripTagHandler.php:19
Definition: RemexStripTagHandler.php:12