1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* LICENSE: This file is subject to the terms and conditions defined in |
5
|
|
|
* file 'LICENSE', which is part of this source code package. |
6
|
|
|
* |
7
|
|
|
* @copyright 2016 Copyright(c) - All rights reserved. |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace Rafrsr\LibArray2Object\Tests\Fixtures; |
11
|
|
|
|
12
|
|
|
use Rafrsr\LibArray2Object\Tests\Fixtures\NameSpace2\Manager as Trainer; |
13
|
|
|
use Rafrsr\LibArray2Object\Tests\Fixtures\NameSpace2\Manager; |
14
|
|
|
|
15
|
|
|
class Team extends AbstractTeam |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var Trainer |
19
|
|
|
*/ |
20
|
|
|
protected $manager; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var \DateTime |
24
|
|
|
*/ |
25
|
|
|
protected $createdAt; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var integer |
29
|
|
|
*/ |
30
|
|
|
protected $points; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var array|Player[]|[] |
34
|
|
|
*/ |
35
|
|
|
protected $players; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var array|integer[] |
39
|
|
|
*/ |
40
|
|
|
protected $scores; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* AbstractTeam constructor. |
44
|
|
|
* |
45
|
|
|
* @param string $name |
46
|
|
|
*/ |
47
|
|
|
public function __construct($name = null) |
48
|
|
|
{ |
49
|
|
|
parent::__construct($name); |
50
|
|
|
$this->manager = new Manager(); |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @return Trainer |
55
|
|
|
*/ |
56
|
|
|
public function getManager() |
57
|
|
|
{ |
58
|
|
|
return $this->manager; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @param Trainer $manager |
63
|
|
|
* |
64
|
|
|
* @return $this |
65
|
|
|
*/ |
66
|
|
|
public function setManager($manager) |
67
|
|
|
{ |
68
|
|
|
$this->manager = $manager; |
69
|
|
|
|
70
|
|
|
return $this; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @return \DateTime |
75
|
|
|
*/ |
76
|
|
|
public function getCreatedAt() |
77
|
|
|
{ |
78
|
|
|
return $this->createdAt; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @param \DateTime $createdAt |
83
|
|
|
* |
84
|
|
|
* @return $this |
85
|
|
|
*/ |
86
|
|
|
public function setCreatedAt($createdAt) |
87
|
|
|
{ |
88
|
|
|
$this->createdAt = $createdAt; |
89
|
|
|
|
90
|
|
|
return $this; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return int |
95
|
|
|
*/ |
96
|
|
|
public function getPoints() |
97
|
|
|
{ |
98
|
|
|
return $this->points; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param int $points |
103
|
|
|
* |
104
|
|
|
* @return $this |
105
|
|
|
*/ |
106
|
|
|
public function setPoints($points) |
107
|
|
|
{ |
108
|
|
|
$this->points = $points; |
109
|
|
|
|
110
|
|
|
return $this; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return array|Player[] |
115
|
|
|
*/ |
116
|
|
|
public function getPlayers() |
117
|
|
|
{ |
118
|
|
|
return $this->players; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @param array|Player[] $players |
123
|
|
|
* |
124
|
|
|
* @return $this |
125
|
|
|
*/ |
126
|
|
|
public function setPlayers($players) |
127
|
|
|
{ |
128
|
|
|
$this->players = $players; |
129
|
|
|
|
130
|
|
|
return $this; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @return array |
135
|
|
|
*/ |
136
|
|
|
public function getScores() |
137
|
|
|
{ |
138
|
|
|
return $this->scores; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @param array $scores |
143
|
|
|
* |
144
|
|
|
* @return $this |
145
|
|
|
*/ |
146
|
|
|
public function setScores($scores) |
147
|
|
|
{ |
148
|
|
|
$this->scores = $scores; |
149
|
|
|
|
150
|
|
|
return $this; |
151
|
|
|
} |
152
|
|
|
} |