1 | <?php |
||
21 | class GetTranslationsResponse |
||
22 | { |
||
23 | /** |
||
24 | * @var Language |
||
25 | */ |
||
26 | protected $from; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $state; |
||
32 | |||
33 | /** |
||
34 | * @var TranslationMatch[] |
||
35 | */ |
||
36 | protected $translations; |
||
37 | |||
38 | /** |
||
39 | * GetTranslationsResponse constructor. |
||
40 | * @param $from |
||
41 | * @param null $state |
||
42 | */ |
||
43 | 6 | public function __construct($from, $state = null) |
|
48 | |||
49 | /** |
||
50 | * @param \SimpleXMLElement $xml |
||
51 | * @return GetTranslationsResponse |
||
52 | */ |
||
53 | 6 | public static function fromXml(\SimpleXMLElement $xml) |
|
63 | |||
64 | 6 | public function addTranslation(TranslationMatch $translation) |
|
68 | |||
69 | /** |
||
70 | * @return TranslationMatch[] |
||
71 | */ |
||
72 | 5 | public function getTranslations() |
|
76 | |||
77 | /** |
||
78 | * @return null|string |
||
79 | */ |
||
80 | 3 | public function getState() |
|
84 | |||
85 | /** |
||
86 | * @return Language |
||
87 | */ |
||
88 | 3 | public function getFrom() |
|
92 | } |