1
|
|
|
<?php |
2
|
|
|
namespace Perry\Representation\Eve\v2; |
3
|
|
|
|
4
|
|
|
use \Perry\Representation\Reference as Reference; |
5
|
|
|
use \Perry\Representation\Uri as Uri; |
6
|
|
|
use \Perry\Representation\Base as Base; |
7
|
|
|
|
8
|
|
|
class ItemType extends Base |
9
|
|
|
{ |
10
|
|
|
public $name; |
11
|
|
|
|
12
|
|
|
public $icon64; |
13
|
|
|
|
14
|
|
|
public $extraAttributes; |
15
|
|
|
|
16
|
|
|
public $mShortDescription; |
17
|
|
|
|
18
|
|
|
public $icon32; |
19
|
|
|
|
20
|
|
|
public $attributes; |
21
|
|
|
|
22
|
|
|
public $description; |
23
|
|
|
|
24
|
|
|
// by Warringer\Types\String |
25
|
|
|
public function setName($name) |
26
|
|
|
{ |
27
|
|
|
$this->name = $name; |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
// by Warringer\Types\Reference |
31
|
|
|
public function setIcon64($icon64) |
32
|
|
|
{ |
33
|
|
|
$this->icon64 = new Reference($icon64); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
// by Warringer\Types\Dict |
37
|
|
|
public function setExtraAttributes($extraAttributes) |
38
|
|
|
{ |
39
|
|
|
// by Warringer\Types\Dict |
40
|
|
|
$converters = []; |
41
|
|
|
$converters['skeletalMeshMale'] = function ($value) { return $value; }; |
42
|
|
|
$converters['modifier'] = function ($values) { |
43
|
|
|
// by Warringer\Types\Dict |
44
|
|
|
$converters = []; |
45
|
|
|
$converters['modifierValue'] = function ($value) { return $value; }; |
46
|
|
|
$converters['attributeName'] = function ($value) { return $value; }; |
47
|
|
|
$converters['modifierType'] = function ($value) { return $value; }; |
48
|
|
|
|
49
|
|
|
$func = function ($value) use($converters) { |
50
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
51
|
|
|
$return['modifierValue'] = isset($value->{'modifierValue'}) ? $converters['modifierValue']($value->{'modifierValue'}) : null; |
52
|
|
|
$return['attributeName'] = isset($value->{'attributeName'}) ? $converters['attributeName']($value->{'attributeName'}) : null; |
53
|
|
|
$return['modifierType'] = isset($value->{'modifierType'}) ? $converters['modifierType']($value->{'modifierType'}) : null; |
54
|
|
|
return $return; |
55
|
|
|
}; |
56
|
|
|
|
57
|
|
|
foreach ($values as $key => $value) { |
58
|
|
|
$values[$key] = $func($value); |
59
|
|
|
} |
60
|
|
|
return $values; |
61
|
|
|
}; |
62
|
|
|
|
63
|
|
|
$converters['slotType'] = function ($value) { return $value; }; |
64
|
|
|
$converters['skeletalMeshFemale'] = function ($value) { return $value; }; |
65
|
|
|
$converters['mVICProp'] = function ($value) { return $value; }; |
66
|
|
|
|
67
|
|
|
$func = function ($value) use($converters) { |
68
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
69
|
|
|
$return['skeletalMeshMale'] = isset($value->{'skeletalMeshMale'}) ? $converters['skeletalMeshMale']($value->{'skeletalMeshMale'}) : null; |
70
|
|
|
$return['modifier'] = isset($value->{'modifier'}) ? $converters['modifier']($value->{'modifier'}) : null; |
71
|
|
|
$return['slotType'] = isset($value->{'slotType'}) ? $converters['slotType']($value->{'slotType'}) : null; |
72
|
|
|
$return['skeletalMeshFemale'] = isset($value->{'skeletalMeshFemale'}) ? $converters['skeletalMeshFemale']($value->{'skeletalMeshFemale'}) : null; |
73
|
|
|
$return['mVICProp'] = isset($value->{'mVICProp'}) ? $converters['mVICProp']($value->{'mVICProp'}) : null; |
74
|
|
|
return $return; |
75
|
|
|
}; |
76
|
|
|
$this->extraAttributes = $func($extraAttributes); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
// by Warringer\Types\String |
80
|
|
|
public function setMShortDescription($mShortDescription) |
81
|
|
|
{ |
82
|
|
|
$this->mShortDescription = $mShortDescription; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
// by Warringer\Types\Reference |
86
|
|
|
public function setIcon32($icon32) |
87
|
|
|
{ |
88
|
|
|
$this->icon32 = new Reference($icon32); |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
// by Warringer\Types\Dict |
92
|
|
|
public function setAttributes($attributes) |
93
|
|
|
{ |
94
|
|
|
// by Warringer\Types\Dict |
95
|
|
|
$converters = []; |
96
|
|
|
$converters['cpu'] = function ($value) { return $value; }; |
97
|
|
|
$converters['power'] = function ($value) { return $value; }; |
98
|
|
|
$converters['heatDamage'] = function ($value) { return $value; }; |
99
|
|
|
|
100
|
|
|
$func = function ($value) use($converters) { |
101
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
102
|
|
|
$return['cpu'] = isset($value->{'cpu'}) ? $converters['cpu']($value->{'cpu'}) : null; |
103
|
|
|
$return['power'] = isset($value->{'power'}) ? $converters['power']($value->{'power'}) : null; |
104
|
|
|
$return['heatDamage'] = isset($value->{'heatDamage'}) ? $converters['heatDamage']($value->{'heatDamage'}) : null; |
105
|
|
|
return $return; |
106
|
|
|
}; |
107
|
|
|
$this->attributes = $func($attributes); |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
// by Warringer\Types\String |
111
|
|
|
public function setDescription($description) |
112
|
|
|
{ |
113
|
|
|
$this->description = $description; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
} |
117
|
|
|
|