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 Alliance extends Base |
9
|
|
|
{ |
10
|
|
|
public $startDate; |
11
|
|
|
|
12
|
|
|
public $corporationsCount; |
13
|
|
|
|
14
|
|
|
public $description; |
15
|
|
|
|
16
|
|
|
public $executorCorporation; |
17
|
|
|
|
18
|
|
|
public $primeHour; |
19
|
|
|
|
20
|
|
|
public $deleted; |
21
|
|
|
|
22
|
|
|
public $creatorCorporation; |
23
|
|
|
|
24
|
|
|
public $url; |
25
|
|
|
|
26
|
|
|
public $creatorCharacter; |
27
|
|
|
|
28
|
|
|
public $capitalSystem; |
29
|
|
|
|
30
|
|
|
public $corporations = []; |
31
|
|
|
|
32
|
|
|
public $shortName; |
33
|
|
|
|
34
|
|
|
public $id; |
35
|
|
|
|
36
|
|
|
public $name; |
37
|
|
|
|
38
|
|
|
// by Warringer\Types\String |
39
|
|
|
public function setStartDate($startDate) |
40
|
|
|
{ |
41
|
|
|
$this->startDate = $startDate; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
// by Warringer\Types\Long |
45
|
|
|
public function setCorporationsCount($corporationsCount) |
46
|
|
|
{ |
47
|
|
|
$this->corporationsCount = $corporationsCount; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
// by Warringer\Types\String |
51
|
|
|
public function setDescription($description) |
52
|
|
|
{ |
53
|
|
|
$this->description = $description; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
// by Warringer\Types\Dict |
57
|
|
|
public function setExecutorCorporation($executorCorporation) |
58
|
|
|
{ |
59
|
|
|
// by Warringer\Types\Dict |
60
|
|
|
$converters = []; |
61
|
|
|
$converters['isNPC'] = function ($value) { return $value; }; |
62
|
|
|
$converters['logo'] = function ($value) { return $value; }; |
63
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
64
|
|
|
$converters['id'] = function ($value) { return $value; }; |
65
|
|
|
$converters['name'] = function ($value) { return $value; }; |
66
|
|
|
|
67
|
|
|
$func = function ($value) use($converters) { |
68
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
69
|
|
|
$return['isNPC'] = isset($value->{'isNPC'}) ? $converters['isNPC']($value->{'isNPC'}) : null; |
70
|
|
|
$return['logo'] = isset($value->{'logo'}) ? $converters['logo']($value->{'logo'}) : null; |
71
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
72
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
73
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
74
|
|
|
return $return; |
75
|
|
|
}; |
76
|
|
|
$this->executorCorporation = $func($executorCorporation); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
// by Warringer\Types\Long |
80
|
|
|
public function setPrimeHour($primeHour) |
81
|
|
|
{ |
82
|
|
|
$this->primeHour = $primeHour; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
// by Warringer\Types\Base |
86
|
|
|
public function setDeleted($deleted) |
87
|
|
|
{ |
88
|
|
|
$this->deleted = $deleted; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
// by Warringer\Types\Dict |
92
|
|
|
public function setCreatorCorporation($creatorCorporation) |
93
|
|
|
{ |
94
|
|
|
// by Warringer\Types\Dict |
95
|
|
|
$converters = []; |
96
|
|
|
$converters['isNPC'] = function ($value) { return $value; }; |
97
|
|
|
$converters['logo'] = function ($value) { return $value; }; |
98
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
99
|
|
|
$converters['id'] = function ($value) { return $value; }; |
100
|
|
|
$converters['name'] = function ($value) { return $value; }; |
101
|
|
|
|
102
|
|
|
$func = function ($value) use($converters) { |
103
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
104
|
|
|
$return['isNPC'] = isset($value->{'isNPC'}) ? $converters['isNPC']($value->{'isNPC'}) : null; |
105
|
|
|
$return['logo'] = isset($value->{'logo'}) ? $converters['logo']($value->{'logo'}) : null; |
106
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
107
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
108
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
109
|
|
|
return $return; |
110
|
|
|
}; |
111
|
|
|
$this->creatorCorporation = $func($creatorCorporation); |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
// by Warringer\Types\String |
115
|
|
|
public function setUrl($url) |
116
|
|
|
{ |
117
|
|
|
$this->url = $url; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
// by Warringer\Types\Dict |
121
|
|
|
public function setCreatorCharacter($creatorCharacter) |
122
|
|
|
{ |
123
|
|
|
// by Warringer\Types\Dict |
124
|
|
|
$converters = []; |
125
|
|
|
$converters['name'] = function ($value) { return $value; }; |
126
|
|
|
$converters['isNPC'] = function ($value) { return $value; }; |
127
|
|
|
$converters['mercenary'] = function ($value) { return new Reference($value); }; |
128
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
129
|
|
|
$converters['capsuleer'] = function ($value) { return new Reference($value); }; |
130
|
|
|
$converters['portrait'] = function ($value) { return $value; }; |
131
|
|
|
$converters['id'] = function ($value) { return $value; }; |
132
|
|
|
|
133
|
|
|
$func = function ($value) use($converters) { |
134
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
135
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
136
|
|
|
$return['isNPC'] = isset($value->{'isNPC'}) ? $converters['isNPC']($value->{'isNPC'}) : null; |
137
|
|
|
$return['mercenary'] = isset($value->{'mercenary'}) ? $converters['mercenary']($value->{'mercenary'}) : null; |
138
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
139
|
|
|
$return['capsuleer'] = isset($value->{'capsuleer'}) ? $converters['capsuleer']($value->{'capsuleer'}) : null; |
140
|
|
|
$return['portrait'] = isset($value->{'portrait'}) ? $converters['portrait']($value->{'portrait'}) : null; |
141
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
142
|
|
|
return $return; |
143
|
|
|
}; |
144
|
|
|
$this->creatorCharacter = $func($creatorCharacter); |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
// by Warringer\Types\Dict |
148
|
|
|
public function setCapitalSystem($capitalSystem) |
149
|
|
|
{ |
150
|
|
|
// by Warringer\Types\Dict |
151
|
|
|
$converters = []; |
152
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
153
|
|
|
$converters['id'] = function ($value) { return $value; }; |
154
|
|
|
$converters['name'] = function ($value) { return $value; }; |
155
|
|
|
|
156
|
|
|
$func = function ($value) use($converters) { |
157
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
158
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
159
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
160
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
161
|
|
|
return $return; |
162
|
|
|
}; |
163
|
|
|
$this->capitalSystem = $func($capitalSystem); |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
// by Warringer\Types\ArrayType |
167
|
|
|
public function setCorporations($corporations) |
168
|
|
|
{ |
169
|
|
|
// by Warringer\Types\Dict |
170
|
|
|
$converters = []; |
171
|
|
|
$converters['isNPC'] = function ($value) { return $value; }; |
172
|
|
|
$converters['logo'] = function ($value) { return $value; }; |
173
|
|
|
$converters['href'] = function ($value) { return new Uri($value); }; |
174
|
|
|
$converters['id'] = function ($value) { return $value; }; |
175
|
|
|
$converters['name'] = function ($value) { return $value; }; |
176
|
|
|
|
177
|
|
|
$func = function ($value) use($converters) { |
178
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
179
|
|
|
$return['isNPC'] = isset($value->{'isNPC'}) ? $converters['isNPC']($value->{'isNPC'}) : null; |
180
|
|
|
$return['logo'] = isset($value->{'logo'}) ? $converters['logo']($value->{'logo'}) : null; |
181
|
|
|
$return['href'] = isset($value->{'href'}) ? $converters['href']($value->{'href'}) : null; |
182
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
183
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
184
|
|
|
return $return; |
185
|
|
|
}; |
186
|
|
|
|
187
|
|
|
foreach ($corporations as $key => $value) { |
188
|
|
|
$this->corporations[$key] = $func($value); |
189
|
|
|
} |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
// by Warringer\Types\String |
193
|
|
|
public function setShortName($shortName) |
194
|
|
|
{ |
195
|
|
|
$this->shortName = $shortName; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
// by Warringer\Types\Long |
199
|
|
|
public function setId($id) |
200
|
|
|
{ |
201
|
|
|
$this->id = $id; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
// by Warringer\Types\String |
205
|
|
|
public function setName($name) |
206
|
|
|
{ |
207
|
|
|
$this->name = $name; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
} |
211
|
|
|
|