TextPhraseRepository
in package
implements
TextPhraseRepository
Class TextPhraseRepository
Interfaces, Classes and Traits
- TextPhraseRepository
- Interface TextPhraseRepository
Table of Contents
- $reader : TextPhraseReader
- $textCache : SafeCache
- __construct() : mixed
- TextPhraseRepository constructor.
- getPhraseText() : string
- Returns a translated text for the given phrase and section.
- getSectionPhrases() : array<string|int, string>
- Returns a list with translated texts of all phrases in the given section.
Properties
$reader
private
TextPhraseReader
$reader
$textCache
private
SafeCache
$textCache
Methods
__construct()
TextPhraseRepository constructor.
public
__construct(CacheFactory $cacheFactory, TextPhraseReader $reader) : mixed
Parameters
- $cacheFactory : CacheFactory
- $reader : TextPhraseReader
Return values
mixed —getPhraseText()
Returns a translated text for the given phrase and section.
public
getPhraseText(string $phrase, string $section, int $languageId) : string
Parameters
- $phrase : string
- $section : string
- $languageId : int
Tags
Return values
string —getSectionPhrases()
Returns a list with translated texts of all phrases in the given section.
public
getSectionPhrases(string $section, int $languageId) : array<string|int, string>
Parameters
- $section : string
- $languageId : int