Свойство | Тип | Описание | |
---|---|---|---|
$cache | Neos\Cache\Frontend\VariableFrontend | ||
$cldrRepository | |||
$localizedLiterals | array | Locale tags are keys for this array. Values are arrays of literals, i.e. names defined in months, days, quarters etc tags. | |
$maxLengthOfSubformats | array | For example, era (G) can be defined in three formats, abbreviated (G, GG, GGG), wide (GGGG), or narrow (GGGGG), so maximal length is set to 5. When length is set to zero, it means that corresponding format has no maximal length. | |
$parsedFormats | array | Example of data stored in this array: 'HH:mm:ss zzz' => array( 'HH', array(':'), 'mm', array(':'), 'ss', array(' '), 'zzz', ); Please note that subformats are stored as array elements, and literals are stored as one-element arrays in the same array. Order of elements in array is important. | |
$parsedFormatsIndices | array | As for one locale there can be defined many formats (at most 2 format types supported by this class - date, time - multiplied by at most 4 format lengths - full, long, medium, short), references are organized in arrays. Example of data stored in this array: 'pl' => array( 'date' => array( 'full' => 'EEEE, d MMMM y', ... ), ... ); |
Метод | Описание | |
---|---|---|
getLocalizedLiteralsForLocale ( |
Returns literals array for locale provided. | |
initializeObject ( ) : void | Constructs the reader, loading parsed data from cache if available. | |
injectCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void | Injects the Flow_I18n_Cldr_Reader_DatesReader cache | |
injectCldrRepository ( |
||
parseCustomFormat ( string $format ) : array | Returns parsed date or time format string provided as parameter. | |
parseFormatFromCldr ( |
Returns parsed date or time format basing on locale and desired format length. | |
shutdownObject ( ) : void | Shutdowns the object, saving parsed format strings to the cache. | |
validateFormatLength ( string $formatLength ) : void | Validates provided format length and throws exception if value is not allowed. | |
validateFormatType ( string $formatType ) : void | Validates provided format type and throws exception if value is not allowed. |
Метод | Описание | |
---|---|---|
parseFormat ( string $format ) : array | Parses a date / time format (with syntax defined in CLDR). | |
parseLocalizedEras ( |
Parses "eras" child of "dates" node and returns it's array representation. | |
parseLocalizedLiterals ( |
Parses one CLDR child of "dates" node and returns it's array representation. | |
prepareDateAndTimeFormat ( string $format, |
Creates one parsed datetime format from date and time formats merged together. |
public getLocalizedLiteralsForLocale ( |
||
$locale | ||
Результат | array | An array with localized literals |
public initializeObject ( ) : void | ||
Результат | void |
public injectCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void | ||
$cache | Neos\Cache\Frontend\VariableFrontend | |
Результат | void |
public injectCldrRepository ( |
||
$repository | ||
Результат | void |
public parseCustomFormat ( string $format ) : array | ||
$format | string | Format string to parse |
Результат | array | An array representing parsed format |
protected parseFormat ( string $format ) : array | ||
$format | string | |
Результат | array | Parsed format |
public parseFormatFromCldr ( |
||
$locale | ||
$formatType | string | A type of format (one of constant values) |
$formatLength | string | A length of format (one of constant values) |
Результат | array | An array representing parsed format |
protected parseLocalizedEras ( |
||
$model | CldrModel to read data from | |
Результат | array | An array with localized literals for "eras" node |
protected parseLocalizedLiterals ( |
||
$model | CldrModel to read data from | |
$literalType | string | One of: month, day, quarter, dayPeriod |
Результат | array | An array with localized literals for given type |
protected prepareDateAndTimeFormat ( string $format, |
||
$format | string | DateTime format |
$locale | Locale to use | |
$formatLength | string | A length of format (full, long, medium, short) or 'default' to use default one from CLDR |
Результат | array | Merged formats of date and time |
public shutdownObject ( ) : void | ||
Результат | void |
public static validateFormatLength ( string $formatLength ) : void | ||
$formatLength | string | |
Результат | void |
public static validateFormatType ( string $formatType ) : void | ||
$formatType | string | |
Результат | void |
protected VariableFrontend,Neos\Cache\Frontend $cache | ||
Результат | Neos\Cache\Frontend\VariableFrontend |
protected CldrRepository,Neos\Flow\I18n\Cldr $cldrRepository | ||
Результат |
protected array $localizedLiterals | ||
Результат | array |
protected static array $maxLengthOfSubformats | ||
Результат | array |
protected array $parsedFormats | ||
Результат | array |
protected array $parsedFormatsIndices | ||
Результат | array |