TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
LanguageStore Class Reference
Inheritance diagram for LanguageStore:
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 ( )

Constructor

Definition at line 53 of file LanguageStore.php.

References LanguageStore\initialize().

Member Function Documentation

flushData (   $fileReference)

Flushes data.

Parameters
string$fileReference
Returns
This instance to allow method chaining

Definition at line 133 of file LanguageStore.php.

getAbsoluteFileReference (   $fileReference)

Gets the absolute file path.

Parameters
string$fileReference
Returns
string
Exceptions
InvalidArgumentException

Definition at line 218 of file LanguageStore.php.

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 (   $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 (   $fileReference)

Get the fileReference without the extension

Parameters
string$fileReferenceFile reference
Returns
string

Definition at line 187 of file LanguageStore.php.

Referenced by LanguageStore\setConfiguration().

getParserInstance (   $fileReference)

Returns the correct parser for a specific file reference.

Parameters
string$fileReferenceFile reference
Returns
Exceptions
TYPO3

Definition at line 202 of file LanguageStore.php.

References GeneralUtility\makeInstance().

getSupportedExtensions ( )

Get supported extensions

Returns
array

Definition at line 232 of file LanguageStore.php.

References LanguageStore\$supportedExtensions.

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 ( )

Initializes the current class.

Returns
void

Definition at line 63 of file LanguageStore.php.

References $GLOBALS, and GeneralUtility\trimExplode().

Referenced by LanguageStore\__construct().

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
TYPO3
TYPO3

Definition at line 149 of file LanguageStore.php.

References $GLOBALS, GeneralUtility\getFileAbsFileName(), and LanguageStore\getFileReferenceWithoutExtension().

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 LanguageStore\$data.

Member Data Documentation

$configuration
protected

Definition at line 41 of file LanguageStore.php.

$data
protected

Definition at line 48 of file LanguageStore.php.

Referenced by LanguageStore\setData().

$supportedExtensions
protected

Definition at line 31 of file LanguageStore.php.

Referenced by LanguageStore\getSupportedExtensions().