L10n update for PHPdoc array descriptions
Make the PHPdoc array description detailed for the parseLocale method
This commit is contained in:
@@ -39,11 +39,25 @@ $file = getcwd() . DIRECTORY_SEPARATOR . 'class_test.file.php';
|
|||||||
print "GETLINESFROMFILE: $file: " . File::getLinesFromFile($file) . "<br>";
|
print "GETLINESFROMFILE: $file: " . File::getLinesFromFile($file) . "<br>";
|
||||||
print "MIMEINFO: $file: " . File::getMimeType($file) . "<br>";
|
print "MIMEINFO: $file: " . File::getMimeType($file) . "<br>";
|
||||||
try {
|
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) {
|
} catch (\Exception $e) {
|
||||||
print "Error: " . get_class($e) . ": " . $e->getMessage() . "<br>";
|
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>";
|
print "</body></html>";
|
||||||
|
|
||||||
// __END__
|
// __END__
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ class L10n
|
|||||||
* Get the local as array same to the GetLocale::setLocale return
|
* 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
|
* 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
|
public function getLocaleAsArray(): array
|
||||||
{
|
{
|
||||||
@@ -321,7 +321,7 @@ class L10n
|
|||||||
* parse the locale string for further processing
|
* parse the locale string for further processing
|
||||||
*
|
*
|
||||||
* @param string $locale Locale to parse
|
* @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
|
public static function parseLocale(string $locale = ''): array
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user