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