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 TournamentTeamMemberCollection 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['alliance'] = function ($value) { return new Reference($value); }; |
32
|
|
|
$converters['name'] = function ($value) { return $value; }; |
33
|
|
|
$converters['corporation'] = function ($value) { return new Reference($value); }; |
34
|
|
|
$converters['self'] = function ($value) { return new Reference($value); }; |
35
|
|
|
$converters['character'] = function ($value) { return new Reference($value); }; |
36
|
|
|
$converters['icon'] = function ($value) { return new Reference($value); }; |
37
|
|
|
|
38
|
|
|
$func = function ($value) use($converters) { |
39
|
|
|
$return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS); |
40
|
|
|
$return['alliance'] = isset($value->{'alliance'}) ? $converters['alliance']($value->{'alliance'}) : null; |
41
|
|
|
$return['name'] = isset($value->{'name'}) ? $converters['name']($value->{'name'}) : null; |
42
|
|
|
$return['corporation'] = isset($value->{'corporation'}) ? $converters['corporation']($value->{'corporation'}) : null; |
43
|
|
|
$return['self'] = isset($value->{'self'}) ? $converters['self']($value->{'self'}) : null; |
44
|
|
|
$return['character'] = isset($value->{'character'}) ? $converters['character']($value->{'character'}) : null; |
45
|
|
|
$return['icon'] = isset($value->{'icon'}) ? $converters['icon']($value->{'icon'}) : null; |
46
|
|
|
return $return; |
47
|
|
|
}; |
48
|
|
|
|
49
|
|
|
foreach ($items as $key => $value) { |
50
|
|
|
$this->items[$key] = $func($value); |
51
|
|
|
} |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
// by Warringer\Types\Long |
55
|
|
|
public function setTotalCount($totalCount) |
56
|
|
|
{ |
57
|
|
|
$this->totalCount = $totalCount; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
// by Warringer\Types\Reference |
61
|
|
|
public function setNext($next) |
62
|
|
|
{ |
63
|
|
|
$this->next = new Reference($next); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
// by Warringer\Types\Reference |
67
|
|
|
public function setPrevious($previous) |
68
|
|
|
{ |
69
|
|
|
$this->previous = new Reference($previous); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
} |
73
|
|
|
|