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 TournamentTeam extends Base |
9
|
|
|
{ |
10
|
|
|
public $banFrequencyAgainst = []; |
11
|
|
|
|
12
|
|
|
public $shipsKilled; |
13
|
|
|
|
14
|
|
|
public $pilots = []; |
15
|
|
|
|
16
|
|
|
public $matches = []; |
17
|
|
|
|
18
|
|
|
public $flagshipType; |
19
|
|
|
|
20
|
|
|
public $name; |
21
|
|
|
|
22
|
|
|
public $seed; |
23
|
|
|
|
24
|
|
|
public $banFrequency = []; |
25
|
|
|
|
26
|
|
|
public $members; |
27
|
|
|
|
28
|
|
|
public $captain; |
29
|
|
|
|
30
|
|
|
public $iskKilled; |
31
|
|
|
|
32
|
|
|
// by Warringer\Types\ArrayType |
33
|
|
|
public function setBanFrequencyAgainst($banFrequencyAgainst) |
34
|
|
|
{ |
35
|
|
|
// by Warringer\Types\Dict |
36
|
|
|
$converters = []; |
37
|
|
|
$converters['numBans'] = function ($value) { return $value; }; |
38
|
|
|
$converters['shipType'] = function ($value) { return new Reference($value); }; |
39
|
|
|
|
40
|
|
|
$func = function ($value) use($converters) { |
41
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
42
|
|
|
$return['numBans'] = isset($value->{'numBans'}) ? $converters['numBans']($value->{'numBans'}) : null; |
43
|
|
|
$return['shipType'] = isset($value->{'shipType'}) ? $converters['shipType']($value->{'shipType'}) : null; |
44
|
|
|
return $return; |
45
|
|
|
}; |
46
|
|
|
|
47
|
|
|
foreach ($banFrequencyAgainst as $key => $value) { |
48
|
|
|
$this->banFrequencyAgainst[$key] = $func($value); |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
// by Warringer\Types\Long |
53
|
|
|
public function setShipsKilled($shipsKilled) |
54
|
|
|
{ |
55
|
|
|
$this->shipsKilled = $shipsKilled; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
// by Warringer\Types\ArrayType |
59
|
|
|
public function setPilots($pilots) |
60
|
|
|
{ |
61
|
|
|
// by Warringer\Types\Reference |
62
|
|
|
$func = function ($value) { return new Reference($value); }; |
63
|
|
|
|
64
|
|
|
foreach ($pilots as $key => $value) { |
65
|
|
|
$this->pilots[$key] = $func($value); |
66
|
|
|
} |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
// by Warringer\Types\ArrayType |
70
|
|
|
public function setMatches($matches) |
71
|
|
|
{ |
72
|
|
|
// by Warringer\Types\Reference |
73
|
|
|
$func = function ($value) { return new Reference($value); }; |
74
|
|
|
|
75
|
|
|
foreach ($matches as $key => $value) { |
76
|
|
|
$this->matches[$key] = $func($value); |
77
|
|
|
} |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
// by Warringer\Types\Reference |
81
|
|
|
public function setFlagshipType($flagshipType) |
82
|
|
|
{ |
83
|
|
|
$this->flagshipType = new Reference($flagshipType); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
// by Warringer\Types\String |
87
|
|
|
public function setName($name) |
88
|
|
|
{ |
89
|
|
|
$this->name = $name; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
// by Warringer\Types\Long |
93
|
|
|
public function setSeed($seed) |
94
|
|
|
{ |
95
|
|
|
$this->seed = $seed; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
// by Warringer\Types\ArrayType |
99
|
|
|
public function setBanFrequency($banFrequency) |
100
|
|
|
{ |
101
|
|
|
// by Warringer\Types\Dict |
102
|
|
|
$converters = []; |
103
|
|
|
$converters['numBans'] = function ($value) { return $value; }; |
104
|
|
|
$converters['shipType'] = function ($value) { return new Reference($value); }; |
105
|
|
|
|
106
|
|
|
$func = function ($value) use($converters) { |
107
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
108
|
|
|
$return['numBans'] = isset($value->{'numBans'}) ? $converters['numBans']($value->{'numBans'}) : null; |
109
|
|
|
$return['shipType'] = isset($value->{'shipType'}) ? $converters['shipType']($value->{'shipType'}) : null; |
110
|
|
|
return $return; |
111
|
|
|
}; |
112
|
|
|
|
113
|
|
|
foreach ($banFrequency as $key => $value) { |
114
|
|
|
$this->banFrequency[$key] = $func($value); |
115
|
|
|
} |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
// by Warringer\Types\Reference |
119
|
|
|
public function setMembers($members) |
120
|
|
|
{ |
121
|
|
|
$this->members = new Reference($members); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
// by Warringer\Types\Reference |
125
|
|
|
public function setCaptain($captain) |
126
|
|
|
{ |
127
|
|
|
$this->captain = new Reference($captain); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
// by Warringer\Types\Long |
131
|
|
|
public function setIskKilled($iskKilled) |
132
|
|
|
{ |
133
|
|
|
$this->iskKilled = $iskKilled; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
} |
137
|
|
|
|