Copied!

TranslationServiceDecorator

TranslationServiceDecorator.php : 14
Abstract
Implements TranslationService

Properties

protected $innerService

TranslationServiceDecorator.php : 16
protected TranslationService $innerService

Methods

public__construct()

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

Parameters

Name Type Default value Description
$innerService TranslationService - -

publictranslate()

TranslationServiceDecorator.php : 23

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 : 30

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