Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

API/Repository/Values/Translation/Message.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\API\Repository\Values\Translation;
8
9 use eZ\Publish\API\Repository\Values\Translation;
10
17 class Message extends Translation
18 {
25 protected $message;
26
33 protected $values;
34
41 public function __construct($message, array $values = [])
42 {
43 $this->message = $message;
44 $this->values = $values;
45 }
46
50 public function __toString()
51 {
52 return strtr($this->message, $this->values);
53 }
54 }
eZ\Publish\API\Repository\Values\Translation\Message
Class for translatable messages, which only occur in singular form.
Definition: API/Repository/Values/Translation/Message.php:18
eZ\Publish\API\Repository\Values\Translation\Message\$message
$message
Definition: API/Repository/Values/Translation/Message.php:25
eZ\Publish\API\Repository\Values\Translation\Message\__construct
__construct($message, array $values=[])
Construct singular only message from string and optional value array.
Definition: API/Repository/Values/Translation/Message.php:41
eZ\Publish\API\Repository\Values\Translation\Message\__toString
__toString()
{}
Definition: API/Repository/Values/Translation/Message.php:50
eZ\Publish\API\Repository\Values\Translation\Message\$values
$values
Definition: API/Repository/Values/Translation/Message.php:33
eZ\Publish\API\Repository\Values\Translation
Base class fro translation messages.
Definition: Translation.php:15
eZ\Publish\API\Repository\Values\Translation
Definition: API/Repository/Values/Translation/Message.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.