PHP Класс Inpsyde\MultilingualPress\Module\Redirect\LanguageNegotiation\AcceptLanguageParser

С версии: 3.0.0
Наследование: implements Inpsyde\MultilingualPress\Common\AcceptHeader\AcceptHeaderParser
Показать файл Открыть проект

Открытые методы

Метод Описание
parse ( string $header ) : array Parses the given Accept header and returns the according data in array form.

Приватные методы

Метод Описание
get_values ( string $header ) : string[] Returns the array with the individual values of the given Accept header.
normalize_priority ( string $priority ) : float Returns a normalized float value between 0 and 1 for the given numeric string.
remove_comment ( string $header ) : string Returns the given Accept header without comment.
split_value ( string $value ) : array Returns the array with the language and priority of the given value, and an empty array for an invalid language.

Описание методов

parse() публичный метод

Parses the given Accept header and returns the according data in array form.
С версии: 3.0.0
public parse ( string $header ) : array
$header string Accept header string.
Результат array Parsed Accept header in array form.