| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class ArrayDirKey implements IKey |
||
| 19 | { |
||
| 20 | use TLang; |
||
| 21 | |||
| 22 | protected string $prefix = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string[] $prefix |
||
| 26 | * @param IStTranslations|null $lang |
||
| 27 | * @throws StorageException |
||
| 28 | */ |
||
| 29 | 2 | public function __construct(array $prefix, ?IStTranslations $lang = null) |
|
| 30 | { |
||
| 31 | 2 | $this->setStLang($lang); |
|
| 32 | 2 | if ($pt = realpath(implode(DIRECTORY_SEPARATOR, $prefix))) { |
|
| 33 | 1 | $this->prefix = strval($pt); |
|
| 34 | } else { |
||
| 35 | 1 | throw new StorageException($this->getStLang()->stPathNotFound()); |
|
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function fromSharedKey(string $key): string |
|
| 42 | } |
||
| 43 | } |
||
| 44 |