ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
LanguageFileParsing.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Language\Setup;
22
24
29trait LanguageFileParsing
30{
31 private function absoluteDirectoryPath(string $absolute_path, LanguageFileDirectory $directory): string
32 {
33 return rtrim($absolute_path, '/') . '/' . ltrim($directory->getPath(), '/');
34 }
35
40 private function cutHeader(array $content)
41 {
42 foreach ($content as $key => $val) {
43 if (trim($val) === "<!-- language file start -->") {
44 return array_slice($content, $key + 1);
45 }
46 }
47 return false;
48 }
49}
A directory of language files with a path and a prefix for them.