Page MenuHomeWickedGov Phorge

Insertable.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

Insertable.php

<?php
declare( strict_types = 1 );
namespace MediaWiki\Extension\Translate\TranslatorInterface\Insertable;
/**
* Insertable is a string that usually does not need translation and is
* difficult to type manually.
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @since 2020.12
*/
class Insertable {
/** @var string What to show to the user */
protected $display;
/**
* @var string What to insert before selection, or what to replace
* the selection with, if $post remains empty.
*/
protected $pre;
/** @var string What to insert after selection */
protected $post;
/**
* @param string $display What to show to the user
* @param string $pre What to insert before selection, or replace
* selection if $post remains empty
* @param string $post What to insert after selection. If it is not
* given, $pre will replace selection.
*/
public function __construct( string $display, string $pre = '', string $post = '' ) {
$this->display = $display;
$this->pre = $pre;
$this->post = $post;
}
public function getPreText(): string {
return $this->pre;
}
public function getPostText(): string {
return $this->post;
}
public function getDisplayText(): string {
return $this->display;
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 19 2026, 17:14 (4 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b0/2e/8b09a2e60e4a273ea58f388de1f1
Default Alt Text
Insertable.php (1 KB)

Event Timeline