summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/src/PageTranslation/TranslationVariable.php')
-rw-r--r--MLEB/Translate/src/PageTranslation/TranslationVariable.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/MLEB/Translate/src/PageTranslation/TranslationVariable.php b/MLEB/Translate/src/PageTranslation/TranslationVariable.php
new file mode 100644
index 00000000..c5958af6
--- /dev/null
+++ b/MLEB/Translate/src/PageTranslation/TranslationVariable.php
@@ -0,0 +1,38 @@
+<?php
+declare( strict_types = 1 );
+
+namespace MediaWiki\Extension\Translate\PageTranslation;
+
+/**
+ * This class represents one translation variable in a translation unit.
+ *
+ * @author Niklas Laxström
+ * @license GPL-2.0-or-later
+ * @since 2021.03
+ */
+class TranslationVariable {
+ /** @var string */
+ private $definition;
+ /** @var string */
+ private $name;
+ /** @var string */
+ private $value;
+
+ public function __construct( string $definition, string $name, string $value ) {
+ $this->definition = $definition;
+ $this->name = $name;
+ $this->value = $value;
+ }
+
+ public function getDefinition(): string {
+ return $this->definition;
+ }
+
+ public function getName(): string {
+ return $this->name;
+ }
+
+ public function getValue(): string {
+ return $this->value;
+ }
+}