PHP Класс Neos\Flow\I18n\Detector

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$localeCollection LocaleCollection A collection of Locale objects representing currently installed locales, in a hierarchical manner.
$localizationService Service

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

Метод Описание
detectLocaleFromHttpHeader ( string $acceptLanguageHeader ) : Locale Returns best-matching Locale object based on the Accept-Language header provided as parameter. System default locale will be returned if no successful matches were done.
detectLocaleFromLocaleTag ( string $localeIdentifier ) : Locale Returns best-matching Locale object based on the locale identifier provided as parameter. System default locale will be returned if no successful matches were done.
detectLocaleFromTemplateLocale ( Locale $locale ) : Locale Returns best-matching Locale object based on the template Locale object provided as parameter. System default locale will be returned if no successful matches were done.
injectLocaleCollection ( LocaleCollection $localeCollection ) : void
injectLocalizationService ( Service $localizationService ) : void

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

detectLocaleFromHttpHeader() публичный Метод

Returns best-matching Locale object based on the Accept-Language header provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromHttpHeader ( string $acceptLanguageHeader ) : Locale
$acceptLanguageHeader string The Accept-Language HTTP header
Результат Locale Best-matching existing Locale instance

detectLocaleFromLocaleTag() публичный Метод

Returns best-matching Locale object based on the locale identifier provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromLocaleTag ( string $localeIdentifier ) : Locale
$localeIdentifier string The locale identifier as used in Locale class
Результат Locale Best-matching existing Locale instance

detectLocaleFromTemplateLocale() публичный Метод

Returns best-matching Locale object based on the template Locale object provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromTemplateLocale ( Locale $locale ) : Locale
$locale Locale The template Locale object
Результат Locale Best-matching existing Locale instance

injectLocaleCollection() публичный Метод

public injectLocaleCollection ( LocaleCollection $localeCollection ) : void
$localeCollection LocaleCollection
Результат void

injectLocalizationService() публичный Метод

public injectLocalizationService ( Service $localizationService ) : void
$localizationService Service
Результат void

Описание свойств

$localeCollection защищенное свойство

A collection of Locale objects representing currently installed locales, in a hierarchical manner.
protected LocaleCollection,Neos\Flow\I18n $localeCollection
Результат LocaleCollection

$localizationService защищенное свойство

protected Service,Neos\Flow\I18n $localizationService
Результат Service