MediaWiki master
ContentTextTransformStage.php
Go to the documentation of this file.
1<?php
2
4
7
14
15 public function transform( ParserOutput $po, ?ParserOptions $popts, array &$options ): ParserOutput {
16 $text = $po->getContentHolderText();
17 $text = $this->transformText( $text, $po, $popts, $options );
18 $po->setContentHolderText( $text );
19 return $po;
20 }
21
22 abstract protected function transformText(
23 string $text, ParserOutput $po, ?ParserOptions $popts, array &$options
24 ): string;
25}
OutputTransformStages that only modify the content.
transformText(string $text, ParserOutput $po, ?ParserOptions $popts, array &$options)
transform(ParserOutput $po, ?ParserOptions $popts, array &$options)
Transforms the input ParserOutput into the returned ParserOutput.
ParserOutput is a rendering of a Content object or a message.
setContentHolderText(string $s)
Sets the content holder text of the ParserOutput.
Set options of the Parser.
Classes implementing the OutputTransformStage aim at being added to a pipeline of transformations tha...