|
1
|
|
|
<?php |
|
2
|
|
|
namespace Perry\Representation\Eve\v1; |
|
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 Character extends Base |
|
9
|
|
|
{ |
|
10
|
|
|
public $standings; |
|
11
|
|
|
|
|
12
|
|
|
public $bloodLine; |
|
13
|
|
|
|
|
14
|
|
|
public $private; |
|
15
|
|
|
|
|
16
|
|
|
public $channels; |
|
17
|
|
|
|
|
18
|
|
|
public $href; |
|
19
|
|
|
|
|
20
|
|
|
public $accounts; |
|
21
|
|
|
|
|
22
|
|
|
public $portrait; |
|
23
|
|
|
|
|
24
|
|
|
public $id; |
|
25
|
|
|
|
|
26
|
|
|
public $blocked; |
|
27
|
|
|
|
|
28
|
|
|
public $statistics; |
|
29
|
|
|
|
|
30
|
|
|
public $contacts; |
|
31
|
|
|
|
|
32
|
|
|
public $corporation; |
|
33
|
|
|
|
|
34
|
|
|
public $vipLevel; |
|
35
|
|
|
|
|
36
|
|
|
public $capsuleer; |
|
37
|
|
|
|
|
38
|
|
|
public $vivox; |
|
39
|
|
|
|
|
40
|
|
|
public $description; |
|
41
|
|
|
|
|
42
|
|
|
public $notifications; |
|
43
|
|
|
|
|
44
|
|
|
public $mail; |
|
45
|
|
|
|
|
46
|
|
|
public $name; |
|
47
|
|
|
|
|
48
|
|
|
public $gender; |
|
49
|
|
|
|
|
50
|
|
|
public $mercenary; |
|
51
|
|
|
|
|
52
|
|
|
public $race; |
|
53
|
|
|
|
|
54
|
|
|
public $deposit; |
|
55
|
|
|
|
|
56
|
|
|
// by Warringer\Types\Reference |
|
57
|
|
|
public function setStandings($standings) |
|
58
|
|
|
{ |
|
59
|
|
|
$this->standings = new Reference($standings); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
// by Warringer\Types\Reference |
|
63
|
|
|
public function setBloodLine($bloodLine) |
|
64
|
|
|
{ |
|
65
|
|
|
$this->bloodLine = new Reference($bloodLine); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
// by Warringer\Types\Reference |
|
69
|
|
|
public function setPrivate($private) |
|
70
|
|
|
{ |
|
71
|
|
|
$this->private = new Reference($private); |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
// by Warringer\Types\Reference |
|
75
|
|
|
public function setChannels($channels) |
|
76
|
|
|
{ |
|
77
|
|
|
$this->channels = new Reference($channels); |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
// by Warringer\Types\Uri |
|
81
|
|
|
public function setHref($href) |
|
82
|
|
|
{ |
|
83
|
|
|
$this->href = new Uri($href); |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
// by Warringer\Types\Reference |
|
87
|
|
|
public function setAccounts($accounts) |
|
88
|
|
|
{ |
|
89
|
|
|
$this->accounts = new Reference($accounts); |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
// by Warringer\Types\Dict |
|
93
|
|
|
public function setPortrait($portrait) |
|
94
|
|
|
{ |
|
95
|
|
|
// by Warringer\Types\Dict |
|
96
|
|
|
$converters = []; |
|
97
|
|
|
$converters['32x32'] = function ($value) { return new Reference($value); }; |
|
98
|
|
|
$converters['64x64'] = function ($value) { return new Reference($value); }; |
|
99
|
|
|
$converters['128x128'] = function ($value) { return new Reference($value); }; |
|
100
|
|
|
$converters['256x256'] = function ($value) { return new Reference($value); }; |
|
101
|
|
|
|
|
102
|
|
|
$func = function ($value) use($converters) { |
|
103
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
|
104
|
|
|
$return['32x32'] = isset($value->{'32x32'}) ? $converters['32x32']($value->{'32x32'}) : null; |
|
105
|
|
|
$return['64x64'] = isset($value->{'64x64'}) ? $converters['64x64']($value->{'64x64'}) : null; |
|
106
|
|
|
$return['128x128'] = isset($value->{'128x128'}) ? $converters['128x128']($value->{'128x128'}) : null; |
|
107
|
|
|
$return['256x256'] = isset($value->{'256x256'}) ? $converters['256x256']($value->{'256x256'}) : null; |
|
108
|
|
|
return $return; |
|
109
|
|
|
}; |
|
110
|
|
|
$this->portrait = $func($portrait); |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
// by Warringer\Types\Long |
|
114
|
|
|
public function setId($id) |
|
115
|
|
|
{ |
|
116
|
|
|
$this->id = $id; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
// by Warringer\Types\Reference |
|
120
|
|
|
public function setBlocked($blocked) |
|
121
|
|
|
{ |
|
122
|
|
|
$this->blocked = new Reference($blocked); |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
// by Warringer\Types\Reference |
|
126
|
|
|
public function setStatistics($statistics) |
|
127
|
|
|
{ |
|
128
|
|
|
$this->statistics = new Reference($statistics); |
|
129
|
|
|
} |
|
130
|
|
|
|
|
131
|
|
|
// by Warringer\Types\Reference |
|
132
|
|
|
public function setContacts($contacts) |
|
133
|
|
|
{ |
|
134
|
|
|
$this->contacts = new Reference($contacts); |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
// by Warringer\Types\Dict |
|
138
|
|
|
public function setCorporation($corporation) |
|
139
|
|
|
{ |
|
140
|
|
|
// by Warringer\Types\Dict |
|
141
|
|
|
$converters = []; |
|
142
|
|
|
$converters['isNPC'] = function ($value) { return $value; }; |
|
143
|
|
|
$converters['logo'] = function ($value) { return $value; }; |
|
144
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
|
145
|
|
|
$converters['id'] = function ($value) { return $value; }; |
|
146
|
|
|
$converters['name'] = function ($value) { return $value; }; |
|
147
|
|
|
|
|
148
|
|
|
$func = function ($value) use($converters) { |
|
149
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
|
150
|
|
|
$return['isNPC'] = isset($value->{'isNPC'}) ? $converters['isNPC']($value->{'isNPC'}) : null; |
|
151
|
|
|
$return['logo'] = isset($value->{'logo'}) ? $converters['logo']($value->{'logo'}) : null; |
|
152
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
|
153
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
|
154
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
|
155
|
|
|
return $return; |
|
156
|
|
|
}; |
|
157
|
|
|
$this->corporation = $func($corporation); |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
// by Warringer\Types\Long |
|
161
|
|
|
public function setVipLevel($vipLevel) |
|
162
|
|
|
{ |
|
163
|
|
|
$this->vipLevel = $vipLevel; |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
// by Warringer\Types\Reference |
|
167
|
|
|
public function setCapsuleer($capsuleer) |
|
168
|
|
|
{ |
|
169
|
|
|
$this->capsuleer = new Reference($capsuleer); |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
// by Warringer\Types\Reference |
|
173
|
|
|
public function setVivox($vivox) |
|
174
|
|
|
{ |
|
175
|
|
|
$this->vivox = new Reference($vivox); |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
// by Warringer\Types\String |
|
179
|
|
|
public function setDescription($description) |
|
180
|
|
|
{ |
|
181
|
|
|
$this->description = $description; |
|
182
|
|
|
} |
|
183
|
|
|
|
|
184
|
|
|
// by Warringer\Types\Reference |
|
185
|
|
|
public function setNotifications($notifications) |
|
186
|
|
|
{ |
|
187
|
|
|
$this->notifications = new Reference($notifications); |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
// by Warringer\Types\Reference |
|
191
|
|
|
public function setMail($mail) |
|
192
|
|
|
{ |
|
193
|
|
|
$this->mail = new Reference($mail); |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
// by Warringer\Types\String |
|
197
|
|
|
public function setName($name) |
|
198
|
|
|
{ |
|
199
|
|
|
$this->name = $name; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
// by Warringer\Types\Long |
|
203
|
|
|
public function setGender($gender) |
|
204
|
|
|
{ |
|
205
|
|
|
$this->gender = $gender; |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
// by Warringer\Types\Reference |
|
209
|
|
|
public function setMercenary($mercenary) |
|
210
|
|
|
{ |
|
211
|
|
|
$this->mercenary = new Reference($mercenary); |
|
212
|
|
|
} |
|
213
|
|
|
|
|
214
|
|
|
// by Warringer\Types\Reference |
|
215
|
|
|
public function setRace($race) |
|
216
|
|
|
{ |
|
217
|
|
|
$this->race = new Reference($race); |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
// by Warringer\Types\Reference |
|
221
|
|
|
public function setDeposit($deposit) |
|
222
|
|
|
{ |
|
223
|
|
|
$this->deposit = new Reference($deposit); |
|
224
|
|
|
} |
|
225
|
|
|
|
|
226
|
|
|
} |
|
227
|
|
|
|