TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Localization\LanguageStore Class Reference
Inheritance diagram for TYPO3\CMS\Core\Localization\LanguageStore:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
 initialize ()
 
 hasData ($fileReference, $languageKey)
 
 getData ($fileReference)
 
 getDataByLanguage ($fileReference, $languageKey)
 
 setData ($fileReference, $languageKey, $data)
 
 flushData ($fileReference)
 
 setConfiguration ($fileReference, $languageKey, $charset)
 
 getFileReferenceWithoutExtension ($fileReference)
 
 getParserInstance ($fileReference)
 
 getAbsoluteFileReference ($fileReference)
 
 getSupportedExtensions ()
 

Protected Attributes

 $supportedExtensions
 
 $configuration
 
 $data
 

Detailed Description

Language store.

Definition at line 24 of file LanguageStore.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Definition at line 53 of file LanguageStore.php.

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

Member Function Documentation

◆ flushData()

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

Flushes data.

Parameters
string$fileReference
Returns
This instance to allow method chaining

Definition at line 133 of file LanguageStore.php.

◆ getAbsoluteFileReference()

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

Gets the absolute file path.

Parameters
string$fileReference
Returns
string
Exceptions

Definition at line 218 of file LanguageStore.php.

◆ getData()

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$fileReferenceFile reference
Returns
array

Definition at line 95 of file LanguageStore.php.

◆ getDataByLanguage()

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

Retrieves data from the store for a language.

Parameters
string$fileReferenceFile reference
string$languageKeyValid language key
Returns
array
See also
self::getData()

Definition at line 108 of file LanguageStore.php.

◆ getFileReferenceWithoutExtension()

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

Get the fileReference without the extension

Parameters
string$fileReferenceFile reference
Returns
string

Definition at line 187 of file LanguageStore.php.

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

◆ getParserInstance()

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

Returns the correct parser for a specific file reference.

Parameters
string$fileReferenceFile reference
Returns
Exceptions

Definition at line 202 of file LanguageStore.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ getSupportedExtensions()

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

Get supported extensions

Returns
array

Definition at line 232 of file LanguageStore.php.

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

◆ hasData()

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

Checks if the store contains parsed data.

Parameters
string$fileReferenceFile reference
string$languageKeyValid language key
Returns
bool

Definition at line 79 of file LanguageStore.php.

◆ initialize()

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

Initializes the current class.

Returns
void

Definition at line 63 of file LanguageStore.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

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

◆ setConfiguration()

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

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

Parameters
string$fileReferenceFile reference
string$languageKeyValid language key
string$charsetRendering charset
Returns
This instance to allow method chaining
Exceptions

Definition at line 149 of file LanguageStore.php.

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

◆ setData()

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

Sets data for a specific file reference and a language.

Parameters
string$fileReferenceFile reference
string$languageKeyValid language key
array$data
Returns
This instance to allow method chaining

Definition at line 121 of file LanguageStore.php.

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

Member Data Documentation

◆ $configuration

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

Definition at line 41 of file LanguageStore.php.

◆ $data

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

Definition at line 48 of file LanguageStore.php.

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

◆ $supportedExtensions

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