1 | <?php |
||
17 | class Season extends Entity implements SeasonInterface { |
||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | protected static $propertyMapDefinition; |
||
23 | |||
24 | /** |
||
25 | * The primary identifier. |
||
26 | * |
||
27 | * @var mixed |
||
28 | */ |
||
29 | protected $id; |
||
30 | |||
31 | /** |
||
32 | * The name. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $name; |
||
37 | |||
38 | /** |
||
39 | * The league of this season. |
||
40 | * |
||
41 | * @var \TheSportsDb\Entity\LeagueInterface |
||
42 | */ |
||
43 | protected $league; |
||
44 | |||
45 | /** |
||
46 | * The events of this season. |
||
47 | * |
||
48 | * @var \TheSportsDb\Entity\EventInterface[] |
||
49 | */ |
||
50 | protected $events = array(); |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function getId() { |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function getName() { |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 1 | public function getLeague() { |
|
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | 1 | public function getEvents() { |
|
79 | |||
80 | /** |
||
81 | * Transforms the league property to a league entity. |
||
82 | * |
||
83 | * @param mixed $value |
||
84 | * The source value of the league property. |
||
85 | * @param \stdClass $context |
||
86 | * The source object representing this season. |
||
87 | * @param EntityManagerInterface $entityManager |
||
88 | * The entity manager. |
||
89 | * |
||
90 | * @return \TheSportsDb\Entity\LeagueInterface |
||
91 | * The league entity. |
||
92 | */ |
||
93 | public static function transformLeague($value, $context, EntityManagerInterface $entityManager) { |
||
96 | |||
97 | /** |
||
98 | * Transforms the events property to event entities. |
||
99 | * |
||
100 | * @param array $values |
||
101 | * The source value of the event property. |
||
102 | * @param \stdClass $context |
||
103 | * The source object representing this season. |
||
104 | * @param EntityManagerInterface $entityManager |
||
105 | * The entity manager. |
||
106 | * |
||
107 | * @return \TheSportsDb\Entity\EventInterface[] |
||
108 | * The event entity. |
||
109 | */ |
||
110 | public static function transformEvents(array $values, $context, EntityManagerInterface $entityManager) { |
||
117 | |||
118 | /** |
||
119 | * Transforms the id property to a unique identifier. |
||
120 | * |
||
121 | * @param mixed $value |
||
122 | * The source value of the id property. |
||
123 | * @param \stdClass $context |
||
124 | * The source object representing this season. |
||
125 | * |
||
126 | * @return string |
||
127 | * The unique identifier. |
||
128 | */ |
||
129 | public static function transformId($value, $context) { |
||
132 | |||
133 | /** |
||
134 | * Reverses the transformation of the id property. |
||
135 | * |
||
136 | * @param mixed $value |
||
137 | * The source value of the id property. |
||
138 | * @param \stdClass $context |
||
139 | * The source object representing this season. |
||
140 | * |
||
141 | * @return string |
||
142 | * The id property value. |
||
143 | */ |
||
144 | public static function reverseId($value, $context) { |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | 1 | protected static function initPropertyMapDefinition() { |
|
177 | |||
178 | } |
||
179 |