1 | <?php |
||
11 | class TranslatedValue implements ValueInterface |
||
12 | { |
||
13 | /** |
||
14 | * The service that will perform the translation |
||
15 | * |
||
16 | * @var TranslatorInterface |
||
17 | */ |
||
18 | private $translator; |
||
19 | |||
20 | /** |
||
21 | * Key to search translation |
||
22 | * @var string|ValueInterface |
||
23 | */ |
||
24 | private $key; |
||
25 | |||
26 | /** |
||
27 | * Parameters to customize the translation |
||
28 | * @var array<string,string>|ValueInterface |
||
29 | */ |
||
30 | private $parameters; |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @param TranslatorInterface $translator |
||
35 | * @param string $key |
||
36 | * @param array<string,string> $parameters |
||
37 | * @Important |
||
38 | */ |
||
39 | public function __construct(TranslatorInterface $translator, $key, array $parameters = []) { |
||
44 | |||
45 | /** |
||
46 | * Returns the value represented by this object. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function val() { |
||
57 | } |