LanguageStore implements SingletonInterface

Internal

This class is not part of the TYPO3 Core API.

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$configuration  : array<string|int, mixed>
Information about parsed file
$data  : array<string, array<string, array<string, array<int, array<string, string>>>>>
Parsed localization file
$supportedExtensions  : array<string|int, mixed>
File extension supported by the localization parser

Methods

__construct()  : mixed
Constructor
flushData()  : LanguageStore
Flushes data.
getAbsoluteFileReference()  : string
Gets the absolute file path.
getData()  : array<string, array<string, array<int, array<string, string>>>>
Retrieves data from the store.
getDataByLanguage()  : array<string, array<int, array<string, string>>>
Retrieves data from the store for a language.
getFileReferenceWithoutExtension()  : string
Get the fileReference without the extension
getLocalizedLabelsPathPattern()  : string
Gets the relative labels file pattern.
getParserInstance()  : LocalizationParserInterface
Returns the correct parser for a specific file reference.
getSupportedExtensions()  : array<string|int, mixed>
Get supported extensions
hasData()  : bool
Checks if the store contains parsed data.
initialize()  : mixed
Initializes the current class.
setConfiguration()  : LanguageStore
Checks file reference configuration (charset, extension, ...).
setData()  : LanguageStore
Sets data for a specific file reference and a language.

Properties

$configuration

Information about parsed file

protected array<string|int, mixed> $configuration

If data come from the cache, this array does not contain any information about this file

$data

Parsed localization file

protected array<string, array<string, array<string, array<int, array<string, string>>>>> $data

$supportedExtensions

File extension supported by the localization parser

protected array<string|int, mixed> $supportedExtensions

Methods

flushData()

Flushes data.

public flushData(string $fileReference) : LanguageStore
Parameters
$fileReference : string
Return values
LanguageStore

This instance to allow method chaining

getAbsoluteFileReference()

Gets the absolute file path.

public getAbsoluteFileReference(string $fileReference) : string
Parameters
$fileReference : string
Tags
throws
InvalidArgumentException
Return values
string

getData()

Retrieves data from the store.

public getData(string $fileReference) : array<string, array<string, array<int, array<string, string>>>>

This method returns all parsed languages for the current file reference.

Parameters
$fileReference : string

File reference

Return values
array<string, array<string, array<int, array<string, string>>>>

getDataByLanguage()

Retrieves data from the store for a language.

public getDataByLanguage(string $fileReference, string $languageKey) : array<string, array<int, array<string, string>>>
Parameters
$fileReference : string

File reference

$languageKey : string

Valid language key

Tags
see
self::getData()
Return values
array<string, array<int, array<string, string>>>

getFileReferenceWithoutExtension()

Get the fileReference without the extension

public getFileReferenceWithoutExtension(string $fileReference) : string
Parameters
$fileReference : string

File reference

Return values
string

getLocalizedLabelsPathPattern()

Gets the relative labels file pattern.

public getLocalizedLabelsPathPattern(string $fileReference) : string
Parameters
$fileReference : string
Tags
throws
InvalidArgumentException
Return values
string

getSupportedExtensions()

Get supported extensions

public getSupportedExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasData()

Checks if the store contains parsed data.

public hasData(string $fileReference, string $languageKey) : bool
Parameters
$fileReference : string

File reference

$languageKey : string

Valid language key

Return values
bool

initialize()

Initializes the current class.

public initialize() : mixed

setConfiguration()

Checks file reference configuration (charset, extension, ...).

public setConfiguration(string $fileReference, string $languageKey) : LanguageStore
Parameters
$fileReference : string

File reference

$languageKey : string

Valid language key

Tags
throws
InvalidParserException
throws
FileNotFoundException
Return values
LanguageStore

This instance to allow method chaining

setData()

Sets data for a specific file reference and a language.

public setData(string $fileReference, string $languageKey, array<string|int, mixed> $data) : LanguageStore
Parameters
$fileReference : string

File reference

$languageKey : string

Valid language key

$data : array<string|int, mixed>
Return values
LanguageStore

This instance to allow method chaining


        
On this page

Search results