summaryrefslogtreecommitdiff
path: root/engine/SkinBase.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SkinBase.php')
-rw-r--r--engine/SkinBase.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/engine/SkinBase.php b/engine/SkinBase.php
new file mode 100644
index 0000000..b50c172
--- /dev/null
+++ b/engine/SkinBase.php
@@ -0,0 +1,22 @@
+<?php
+
+class SkinBase implements LangAccess {
+
+ protected static LangData $ld;
+
+ public static function __constructStatic(): void {
+ self::$ld = LangData::getInstance();
+ }
+
+ public function lang(...$args): string {
+ return htmlescape($this->langRaw(...$args));
+ }
+
+ public function langRaw(string $key, ...$args) {
+ $val = self::$ld[$key];
+ return empty($args) ? $val : sprintf($val, ...$args);
+ }
+
+}
+
+SkinBase::__constructStatic(); \ No newline at end of file