Copied!

TranslationServiceDecorator

TranslationServiceDecorator.php : 14
Implements TranslationService

Properties

protected $innerService

TranslationServiceDecorator.php : 17
protected TranslationService $innerService

Methods

public__construct()

TranslationServiceDecorator.php : 19
public __construct(TranslationService $innerService)

Parameters

Name Type Default value Description
$innerService TranslationService - -

publictranslate()

TranslationServiceDecorator.php : 24

Translate.

public translate(Translation $translation, mixed $locale) : string

Translate a Translation value object.

Parameters

Name Type Default value Description
$translation Translation - -
$locale mixed - -

Return values

string

publictranslateString()

TranslationServiceDecorator.php : 31

Translate string.

public translateString(mixed $translation, mixed $locale) : string

Translate a string. Strings could be useful for the simplest cases. Usually you will always use Translation value objects for this.

Parameters

Name Type Default value Description
$translation mixed - -
$locale mixed - -

Return values

string