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

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

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

Свойство Тип Описание
$currentLocale Locale
$defaultLocale Locale
$fallbackRule array

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

Метод Описание
__construct ( string $defaultLocaleIdentifier ) Constructs a new configuration object with the given locale identifier to be used as the default locale of this configuration.
getCurrentLocale ( ) : Locale Returns the current locale. This is the default locale if no current locale has been set or the set current locale has a language code of "mul".
getDefaultLocale ( ) : Locale Returns the default locale of this configuration.
getFallbackRule ( ) : array Returns the current fallback rule.
setCurrentLocale ( Locale $locale ) : void Sets the current locale of this configuration.
setFallbackRule ( array $fallbackRule ) Allows to set a fallback order for locale resolving. If not set, the implicit inheritance of locales will be used. That is, if a locale of en_UK is requested, matches will be searched for in en_UK and en before trying the default locale configured in Flow.

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

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

Constructs a new configuration object with the given locale identifier to be used as the default locale of this configuration.
public __construct ( string $defaultLocaleIdentifier )
$defaultLocaleIdentifier string

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

Returns the current locale. This is the default locale if no current locale has been set or the set current locale has a language code of "mul".
public getCurrentLocale ( ) : Locale
Результат Locale

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

Returns the default locale of this configuration.
public getDefaultLocale ( ) : Locale
Результат Locale

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

Returns the current fallback rule.
См. также: setFallbackRule()
public getFallbackRule ( ) : array
Результат array

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

Sets the current locale of this configuration.
public setCurrentLocale ( Locale $locale ) : void
$locale Locale
Результат void

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

If this is given an order of [dk, za, fr_CA] a request for en_UK will be looked up in en_UK, en, dk, za, fr_CA, fr before trying the default locale. If strict flag is given in the array, the above example would instead look in en_UK, dk, za, fr_CA before trying the default locale. In other words, the implicit fallback is not applied to the locales in the fallback rule. Here is an example: array('strict' => FALSE, 'order' => array('dk', 'za'))
public setFallbackRule ( array $fallbackRule )
$fallbackRule array

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

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

protected Locale,Neos\Flow\I18n $currentLocale
Результат Locale

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

protected Locale,Neos\Flow\I18n $defaultLocale
Результат Locale

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

protected array $fallbackRule
Результат array