‪TYPO3CMS  9.5
TYPO3\CMS\Core\Localization\LanguageStore Class Reference
Inheritance diagram for TYPO3\CMS\Core\Localization\LanguageStore:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
 initialize ()
 
bool hasData ($fileReference, $languageKey)
 
array getData ($fileReference)
 
array getDataByLanguage ($fileReference, $languageKey)
 
TYPO3 CMS Core Localization LanguageStore setData ($fileReference, $languageKey, $data)
 
TYPO3 CMS Core Localization LanguageStore flushData ($fileReference)
 
TYPO3 CMS Core Localization LanguageStore setConfiguration ($fileReference, $languageKey)
 
string getFileReferenceWithoutExtension ($fileReference)
 
TYPO3 CMS Core Localization Parser LocalizationParserInterface getParserInstance ($fileReference)
 
string getAbsoluteFileReference ($fileReference)
 
array getSupportedExtensions ()
 

Protected Attributes

array $supportedExtensions
 
array $configuration
 
array $data
 

Detailed Description

This class is not part of the TYPO3 Core API.

Definition at line 25 of file LanguageStore.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Localization\LanguageStore::__construct ( )

Constructor

Definition at line 51 of file LanguageStore.php.

References TYPO3\CMS\Core\Localization\LanguageStore\initialize().

Member Function Documentation

◆ flushData()

TYPO3 CMS Core Localization LanguageStore TYPO3\CMS\Core\Localization\LanguageStore::flushData (   $fileReference)

Flushes data.

Parameters
string$fileReference
Returns
‪\TYPO3\CMS\Core\Localization\LanguageStore This instance to allow method chaining

Definition at line 129 of file LanguageStore.php.

◆ getAbsoluteFileReference()

string TYPO3\CMS\Core\Localization\LanguageStore::getAbsoluteFileReference (   $fileReference)

Gets the absolute file path.

Parameters
string$fileReference
Returns
‪string
Exceptions

Definition at line 211 of file LanguageStore.php.

◆ getData()

array TYPO3\CMS\Core\Localization\LanguageStore::getData (   $fileReference)

Retrieves data from the store.

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

Parameters
string$fileReference‪File reference
Returns
‪array

Definition at line 91 of file LanguageStore.php.

◆ getDataByLanguage()

array TYPO3\CMS\Core\Localization\LanguageStore::getDataByLanguage (   $fileReference,
  $languageKey 
)

Retrieves data from the store for a language.

Parameters
string$fileReference‪File reference
string$languageKey‪Valid language key
Returns
‪array
See also
‪self::getData()

Definition at line 104 of file LanguageStore.php.

◆ getFileReferenceWithoutExtension()

string TYPO3\CMS\Core\Localization\LanguageStore::getFileReferenceWithoutExtension (   $fileReference)

Get the fileReference without the extension

Parameters
string$fileReference‪File reference
Returns
‪string

Definition at line 181 of file LanguageStore.php.

Referenced by TYPO3\CMS\Core\Localization\LanguageStore\setConfiguration().

◆ getParserInstance()

TYPO3 CMS Core Localization Parser LocalizationParserInterface TYPO3\CMS\Core\Localization\LanguageStore::getParserInstance (   $fileReference)

Returns the correct parser for a specific file reference.

Parameters
string$fileReference‪File reference
Returns
‪\TYPO3\CMS\Core\Localization\Parser\LocalizationParserInterface
Exceptions

Definition at line 196 of file LanguageStore.php.

◆ getSupportedExtensions()

array TYPO3\CMS\Core\Localization\LanguageStore::getSupportedExtensions ( )

Get supported extensions

Returns
‪array

Definition at line 224 of file LanguageStore.php.

References TYPO3\CMS\Core\Localization\LanguageStore\$supportedExtensions.

◆ hasData()

bool TYPO3\CMS\Core\Localization\LanguageStore::hasData (   $fileReference,
  $languageKey 
)

Checks if the store contains parsed data.

Parameters
string$fileReference‪File reference
string$languageKey‪Valid language key
Returns
‪bool

Definition at line 75 of file LanguageStore.php.

◆ initialize()

TYPO3\CMS\Core\Localization\LanguageStore::initialize ( )

Initializes the current class.

Definition at line 59 of file LanguageStore.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Localization\LanguageStore\__construct().

◆ setConfiguration()

TYPO3 CMS Core Localization LanguageStore TYPO3\CMS\Core\Localization\LanguageStore::setConfiguration (   $fileReference,
  $languageKey 
)

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

Parameters
string$fileReference‪File reference
string$languageKey‪Valid language key
Returns
‪\TYPO3\CMS\Core\Localization\LanguageStore This instance to allow method chaining
Exceptions

Definition at line 144 of file LanguageStore.php.

References $GLOBALS, and TYPO3\CMS\Core\Localization\LanguageStore\getFileReferenceWithoutExtension().

◆ setData()

TYPO3 CMS Core Localization LanguageStore TYPO3\CMS\Core\Localization\LanguageStore::setData (   $fileReference,
  $languageKey,
  $data 
)

Sets data for a specific file reference and a language.

Parameters
string$fileReference‪File reference
string$languageKey‪Valid language key
array$data
Returns
‪\TYPO3\CMS\Core\Localization\LanguageStore This instance to allow method chaining

Definition at line 117 of file LanguageStore.php.

References TYPO3\CMS\Core\Localization\LanguageStore\$data.

Member Data Documentation

◆ $configuration

array TYPO3\CMS\Core\Localization\LanguageStore::$configuration
protected

Information about parsed file

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

Definition at line 40 of file LanguageStore.php.

◆ $data

array TYPO3\CMS\Core\Localization\LanguageStore::$data
protected

Parsed localization file

Definition at line 46 of file LanguageStore.php.

Referenced by TYPO3\CMS\Core\Localization\LanguageStore\setData().

◆ $supportedExtensions

array TYPO3\CMS\Core\Localization\LanguageStore::$supportedExtensions
protected

File extension supported by the localization parser

Definition at line 31 of file LanguageStore.php.

Referenced by TYPO3\CMS\Core\Localization\LanguageStore\getSupportedExtensions().