MediaWiki  REL1_31
RemexStripTagHandler.php
Go to the documentation of this file.
1 <?php
2 
3 use RemexHtml\Tokenizer\Attributes;
4 use RemexHtml\Tokenizer\TokenHandler;
5 use RemexHtml\Tokenizer\Tokenizer;
6 
10 class RemexStripTagHandler implements TokenHandler {
11  private $text = '';
12  public function getResult() {
13  return $this->text;
14  }
15 
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 }
RemexStripTagHandler\error
error( $text, $pos)
Definition: RemexStripTagHandler.php:22
use
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
Definition: APACHE-LICENSE-2.0.txt:10
text
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
RemexStripTagHandler\endTag
endTag( $name, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:31
RemexStripTagHandler\comment
comment( $text, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:37
RemexStripTagHandler
Definition: RemexStripTagHandler.php:10
RemexStripTagHandler\characters
characters( $text, $start, $length, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:25
RemexStripTagHandler\startDocument
startDocument(Tokenizer $t, $fns, $fn)
Definition: RemexStripTagHandler.php:16
php
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
RemexStripTagHandler\$text
$text
Definition: RemexStripTagHandler.php:11
RemexStripTagHandler\doctype
doctype( $name, $public, $system, $quirks, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:34
RemexStripTagHandler\startTag
startTag( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength)
Definition: RemexStripTagHandler.php:28
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:302
$t
$t
Definition: testCompression.php:69
RemexStripTagHandler\endDocument
endDocument( $pos)
Definition: RemexStripTagHandler.php:19
RemexStripTagHandler\getResult
getResult()
Definition: RemexStripTagHandler.php:12