2declare( strict_types = 1 );
4namespace MediaWiki\Extension\Translate\PageTranslation;
14 private string $contents;
15 private string $close;
17 public function __construct(
string $open,
string $contents,
string $close ) {
19 $this->contents = $contents;
20 $this->close = $close;
23 public function contents():
string {
25 return preg_replace(
'/\A\n|\n\z/',
'', $this->contents );
28 public function wrappedContents():
string {
29 return $this->open . $this->contents . $this->close;
Section is one pair of <translate>...</translate> tags.