ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
FakeInstalledLanguageRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
32{
33 public function __construct(
34 private readonly \Closure $installed_languages,
35 ) {
36 }
37
38 public function getInstalledLanguages(): array
39 {
40 return ($this->installed_languages)();
41 }
42
43 public function getInstalledLocalLanguages(): array
44 {
45 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
46 }
47
48 public function getAvailableLanguages(): array
49 {
50 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
51 }
52
53 public function getLocalChanges(string $lang_key, string $min_date = "", string $max_date = ""): array
54 {
55 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
56 }
57
58 public function getLanguageEntries(string $lang_key): array
59 {
60 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
61 }
62
63 public function getLocalLanguages(): array
64 {
65 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
66 }
67
68 public function getInstallableLanguages(): array
69 {
70 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
71 }
72
73 public function getInvalidLocalLanguageFiles(array $language_keys): array
74 {
75 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
76 }
77
78 public function checkLanguage(string $lang_key): bool
79 {
80 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
81 }
82
83 public function checkLocalLanguageFile(string $lang_key): bool
84 {
85 throw new \LogicException(__METHOD__ . ' is not used by AddLanguageEntry.');
86 }
87}
In-memory stand-in for InstalledLanguageRepository (the real one needs a database); only getInstalled...
getLanguageEntries(string $lang_key)
Unlike getLocalChanges(), every entry regardless of local_change: seeds a re-seed that only reads the...
getInvalidLocalLanguageFiles(array $language_keys)
Local language files whose names contain a requested key but do not match the naming scheme.
getLocalChanges(string $lang_key, string $min_date="", string $max_date="")
checkLanguage(string $lang_key)
Validates the global, component and customizing *.lang files of $lang_key.
checkLocalLanguageFile(string $lang_key)
Unlike checkLanguage(), a missing local file is NOT acceptable here.
Read-only access to the installed languages (database) and the available or valid language files (fil...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...