_locale_import_parse_header
includes/locale.inc, строка 819
- Версии
- 5 – 6
_locale_import_parse_header($header)
Parses a Gettext Portable Object file header
Параметры
$header
A string containing the complete header
Возвращаемое значение
An associative array of key-value pairs
Код
<?php
function _locale_import_parse_header($header) {
$hdr = array();
$lines = explode("\n", $header);
foreach ($lines as $line) {
$line = trim($line);
if ($line) {
list($tag, $contents) = explode(":", $line, 2);
$hdr[trim($tag)] = trim($contents);
}
}
return $hdr;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии