Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82ba2a189a |
@@ -39,11 +39,25 @@ $file = getcwd() . DIRECTORY_SEPARATOR . 'class_test.file.php';
|
||||
print "GETLINESFROMFILE: $file: " . File::getLinesFromFile($file) . "<br>";
|
||||
print "MIMEINFO: $file: " . File::getMimeType($file) . "<br>";
|
||||
try {
|
||||
print "MIMEINFO: $file: " . File::getMimeType("does_not_exists.txt") . "<br>";
|
||||
print "MIMEINFO: does_not_exists.txt " . File::getMimeType("does_not_exists.txt") . "<br>";
|
||||
} catch (\Exception $e) {
|
||||
print "Error: " . get_class($e) . ": " . $e->getMessage() . "<br>";
|
||||
}
|
||||
|
||||
$files = [
|
||||
'layout/css/edit.css',
|
||||
'layout/javascript/edit.jq.js',
|
||||
'class_test.file.php',
|
||||
getcwd() . DIRECTORY_SEPARATOR . 'class_test.file.php',
|
||||
];
|
||||
foreach ($files as $file) {
|
||||
try {
|
||||
print "MIMEINFO: $file: " . File::getMimeType($file) . "<br>";
|
||||
} catch (\Exception $e) {
|
||||
print "Error: " . get_class($e) . ": " . $e->getMessage() . "<br>";
|
||||
}
|
||||
}
|
||||
|
||||
print "</body></html>";
|
||||
|
||||
// __END__
|
||||
|
||||
@@ -301,7 +301,7 @@ class L10n
|
||||
* Get the local as array same to the GetLocale::setLocale return
|
||||
* This does not set from outside, but only what is set in the l10n class
|
||||
*
|
||||
* @return array{locale: string, lang: string, lang_short: string, domain: string, encoding: string, path: string}
|
||||
* @return array{locale:string,lang:string,lang_short:string,domain:string,encoding:string,path:string}
|
||||
*/
|
||||
public function getLocaleAsArray(): array
|
||||
{
|
||||
@@ -321,7 +321,7 @@ class L10n
|
||||
* parse the locale string for further processing
|
||||
*
|
||||
* @param string $locale Locale to parse
|
||||
* @return array<string,string|null> array with lang, country, charset, modifier
|
||||
* @return array{lang:string|null,country:string|null,charset:string|null,modifier:string|null} parsed locale
|
||||
*/
|
||||
public static function parseLocale(string $locale = ''): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user