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 IndustryTeamCollection extends Base |
9
|
|
|
{ |
10
|
|
|
public $pageCount; |
11
|
|
|
|
12
|
|
|
public $items = []; |
13
|
|
|
|
14
|
|
|
public $totalCount; |
15
|
|
|
|
16
|
|
|
public $next; |
17
|
|
|
|
18
|
|
|
public $previous; |
19
|
|
|
|
20
|
|
|
// by Warringer\Types\Long |
21
|
|
|
public function setPageCount($pageCount) |
22
|
|
|
{ |
23
|
|
|
$this->pageCount = $pageCount; |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
// by Warringer\Types\ArrayType |
27
|
|
|
public function setItems($items) |
28
|
|
|
{ |
29
|
|
|
// by Warringer\Types\Base |
30
|
|
|
$converters = []; |
31
|
|
|
$converters['solarSystem'] = function ($value) { return $value; }; |
32
|
|
|
$converters['specialization'] = function ($value) { return $value; }; |
33
|
|
|
$converters['creationTime'] = function ($value) { return $value; }; |
34
|
|
|
$converters['workers'] = function ($values) { |
35
|
|
|
// by Warringer\Types\Dict |
36
|
|
|
$converters = []; |
37
|
|
|
$converters['bonus'] = function ($value) { return $value; }; |
38
|
|
|
$converters['specialization'] = function ($value) { return $value; }; |
39
|
|
|
|
40
|
|
|
$func = function ($value) use($converters) { |
41
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
42
|
|
|
$return['bonus'] = isset($value->{'bonus'}) ? $converters['bonus']($value->{'bonus'}) : null; |
43
|
|
|
$return['specialization'] = isset($value->{'specialization'}) ? $converters['specialization']($value->{'specialization'}) : null; |
44
|
|
|
return $return; |
45
|
|
|
}; |
46
|
|
|
|
47
|
|
|
foreach ($values as $key => $value) { |
48
|
|
|
$values[$key] = $func($value); |
49
|
|
|
} |
50
|
|
|
return $values; |
51
|
|
|
}; |
52
|
|
|
|
53
|
|
|
$converters['expiryTime'] = function ($value) { return $value; }; |
54
|
|
|
$converters['solarSystemBids'] = function ($values) { |
55
|
|
|
// by Warringer\Types\Dict |
56
|
|
|
$converters = []; |
57
|
|
|
$converters['characterBids'] = function ($values) { |
58
|
|
|
// by Warringer\Types\Dict |
59
|
|
|
$converters = []; |
60
|
|
|
$converters['character'] = function ($value) { return $value; }; |
61
|
|
|
$converters['bidAmount'] = function ($value) { return $value; }; |
62
|
|
|
|
63
|
|
|
$func = function ($value) use($converters) { |
64
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
65
|
|
|
$return['character'] = isset($value->{'character'}) ? $converters['character']($value->{'character'}) : null; |
66
|
|
|
$return['bidAmount'] = isset($value->{'bidAmount'}) ? $converters['bidAmount']($value->{'bidAmount'}) : null; |
67
|
|
|
return $return; |
68
|
|
|
}; |
69
|
|
|
|
70
|
|
|
foreach ($values as $key => $value) { |
71
|
|
|
$values[$key] = $func($value); |
72
|
|
|
} |
73
|
|
|
return $values; |
74
|
|
|
}; |
75
|
|
|
|
76
|
|
|
$converters['solarSystem'] = function ($value) { return $value; }; |
77
|
|
|
$converters['bidAmount'] = function ($value) { return $value; }; |
78
|
|
|
|
79
|
|
|
$func = function ($value) use($converters) { |
80
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
81
|
|
|
$return['characterBids'] = isset($value->{'characterBids'}) ? $converters['characterBids']($value->{'characterBids'}) : null; |
82
|
|
|
$return['solarSystem'] = isset($value->{'solarSystem'}) ? $converters['solarSystem']($value->{'solarSystem'}) : null; |
83
|
|
|
$return['bidAmount'] = isset($value->{'bidAmount'}) ? $converters['bidAmount']($value->{'bidAmount'}) : null; |
84
|
|
|
return $return; |
85
|
|
|
}; |
86
|
|
|
|
87
|
|
|
foreach ($values as $key => $value) { |
88
|
|
|
$values[$key] = $func($value); |
89
|
|
|
} |
90
|
|
|
return $values; |
91
|
|
|
}; |
92
|
|
|
|
93
|
|
|
$converters['auctionExpiryTime'] = function ($value) { return $value; }; |
94
|
|
|
$converters['activity'] = function ($value) { return $value; }; |
95
|
|
|
$converters['costModifier'] = function ($value) { return $value; }; |
96
|
|
|
$converters['id'] = function ($value) { return $value; }; |
97
|
|
|
$converters['name'] = function ($value) { return $value; }; |
98
|
|
|
|
99
|
|
|
$func = function ($value) use($converters) { |
100
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
101
|
|
|
$return['solarSystem'] = isset($value->{'solarSystem'}) ? $converters['solarSystem']($value->{'solarSystem'}) : null; |
102
|
|
|
$return['specialization'] = isset($value->{'specialization'}) ? $converters['specialization']($value->{'specialization'}) : null; |
103
|
|
|
$return['creationTime'] = isset($value->{'creationTime'}) ? $converters['creationTime']($value->{'creationTime'}) : null; |
104
|
|
|
$return['workers'] = isset($value->{'workers'}) ? $converters['workers']($value->{'workers'}) : null; |
105
|
|
|
$return['expiryTime'] = isset($value->{'expiryTime'}) ? $converters['expiryTime']($value->{'expiryTime'}) : null; |
106
|
|
|
$return['solarSystemBids'] = isset($value->{'solarSystemBids'}) ? $converters['solarSystemBids']($value->{'solarSystemBids'}) : null; |
107
|
|
|
$return['auctionExpiryTime'] = isset($value->{'auctionExpiryTime'}) ? $converters['auctionExpiryTime']($value->{'auctionExpiryTime'}) : null; |
108
|
|
|
$return['activity'] = isset($value->{'activity'}) ? $converters['activity']($value->{'activity'}) : null; |
109
|
|
|
$return['costModifier'] = isset($value->{'costModifier'}) ? $converters['costModifier']($value->{'costModifier'}) : null; |
110
|
|
|
$return['id'] = isset($value->{'id'}) ? $converters['id']($value->{'id'}) : null; |
111
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
112
|
|
|
return $return; |
113
|
|
|
}; |
114
|
|
|
|
115
|
|
|
foreach ($items as $key => $value) { |
116
|
|
|
$this->items[$key] = $func($value); |
117
|
|
|
} |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
// by Warringer\Types\Long |
121
|
|
|
public function setTotalCount($totalCount) |
122
|
|
|
{ |
123
|
|
|
$this->totalCount = $totalCount; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
// by Warringer\Types\Reference |
127
|
|
|
public function setNext($next) |
128
|
|
|
{ |
129
|
|
|
$this->next = new Reference($next); |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
// by Warringer\Types\Reference |
133
|
|
|
public function setPrevious($previous) |
134
|
|
|
{ |
135
|
|
|
$this->previous = new Reference($previous); |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
} |
139
|
|
|
|