1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | use Worldline\Connect\Sdk\Domain\DataObject; |
10: | |
11: | |
12: | |
13: | |
14: | class BrowserData extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $colorDepth = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $innerHeight = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $innerWidth = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $javaEnabled = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $javaScriptEnabled = null; |
40: | |
41: | |
42: | |
43: | |
44: | public $screenHeight = null; |
45: | |
46: | |
47: | |
48: | |
49: | public $screenWidth = null; |
50: | |
51: | |
52: | |
53: | |
54: | public function toObject() |
55: | { |
56: | $object = parent::toObject(); |
57: | if (!is_null($this->colorDepth)) { |
58: | $object->colorDepth = $this->colorDepth; |
59: | } |
60: | if (!is_null($this->innerHeight)) { |
61: | $object->innerHeight = $this->innerHeight; |
62: | } |
63: | if (!is_null($this->innerWidth)) { |
64: | $object->innerWidth = $this->innerWidth; |
65: | } |
66: | if (!is_null($this->javaEnabled)) { |
67: | $object->javaEnabled = $this->javaEnabled; |
68: | } |
69: | if (!is_null($this->javaScriptEnabled)) { |
70: | $object->javaScriptEnabled = $this->javaScriptEnabled; |
71: | } |
72: | if (!is_null($this->screenHeight)) { |
73: | $object->screenHeight = $this->screenHeight; |
74: | } |
75: | if (!is_null($this->screenWidth)) { |
76: | $object->screenWidth = $this->screenWidth; |
77: | } |
78: | return $object; |
79: | } |
80: | |
81: | |
82: | |
83: | |
84: | |
85: | |
86: | public function fromObject($object) |
87: | { |
88: | parent::fromObject($object); |
89: | if (property_exists($object, 'colorDepth')) { |
90: | $this->colorDepth = $object->colorDepth; |
91: | } |
92: | if (property_exists($object, 'innerHeight')) { |
93: | $this->innerHeight = $object->innerHeight; |
94: | } |
95: | if (property_exists($object, 'innerWidth')) { |
96: | $this->innerWidth = $object->innerWidth; |
97: | } |
98: | if (property_exists($object, 'javaEnabled')) { |
99: | $this->javaEnabled = $object->javaEnabled; |
100: | } |
101: | if (property_exists($object, 'javaScriptEnabled')) { |
102: | $this->javaScriptEnabled = $object->javaScriptEnabled; |
103: | } |
104: | if (property_exists($object, 'screenHeight')) { |
105: | $this->screenHeight = $object->screenHeight; |
106: | } |
107: | if (property_exists($object, 'screenWidth')) { |
108: | $this->screenWidth = $object->screenWidth; |
109: | } |
110: | return $this; |
111: | } |
112: | } |
113: | |