Translate extension for MediaWiki
Loading...
Searching...
No Matches
TranslateAnnotationStripper.php
1
<?php
2
declare( strict_types = 1 );
3
4
namespace
MediaWiki\Extension\Translate\PageTranslation;
5
6
use Wikimedia\Parsoid\Ext\AnnotationStripper;
7
8
class
TranslateAnnotationStripper
implements
AnnotationStripper {
9
private
TranslatablePageParser
$parser;
10
11
public
function
__construct(
TranslatablePageParser
$parser ) {
12
$this->parser = $parser;
13
}
14
15
public
function
stripAnnotations(
string
$s ):
string
{
16
return
$this->parser->cleanupTags( $s );
17
}
18
}
MediaWiki\Extension\Translate\PageTranslation\TranslatablePageParser
Generates ParserOutput from text or removes all tags from a text.
Definition
TranslatablePageParser.php:16
MediaWiki\Extension\Translate\PageTranslation\TranslateAnnotationStripper
Definition
TranslateAnnotationStripper.php:8
src
PageTranslation
TranslateAnnotationStripper.php
Generated by
1.10.0