|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @author SignpostMarv |
|
4
|
|
|
*/ |
|
5
|
|
|
declare(strict_types=1); |
|
6
|
|
|
|
|
7
|
|
|
namespace SignpostMarv\DaftObject\SchemaOrg\Intangible; |
|
8
|
|
|
|
|
9
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\DaftObjectTraits; |
|
10
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Intangible as Base; |
|
11
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\Thing; |
|
12
|
|
|
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* @property array<int, string> $broadcastChannelId |
|
16
|
|
|
* @property array<int, string|BroadcastFrequencySpecification> $broadcastFrequency |
|
17
|
|
|
* @property array<int, string> $broadcastServiceTier |
|
18
|
|
|
* @property array<int, string> $genre |
|
19
|
|
|
* @property array<int, Service\CableOrSatelliteService> $inBroadcastLineup |
|
20
|
|
|
* @property array<int, Service\BroadcastService> $providesBroadcastService |
|
21
|
|
|
*/ |
|
22
|
|
|
class BroadcastChannel extends Base |
|
23
|
|
|
{ |
|
24
|
|
|
use DaftObjectTraits\BroadcastFrequency; |
|
25
|
|
|
use DaftObjectTraits\Genre; |
|
26
|
|
|
|
|
27
|
|
|
const SCHEMA_ORG_TYPE = 'BroadcastChannel'; |
|
28
|
|
|
|
|
29
|
|
|
const PROPERTIES = [ |
|
30
|
|
|
'broadcastChannelId', |
|
31
|
|
|
'broadcastFrequency', |
|
32
|
|
|
'broadcastServiceTier', |
|
33
|
|
|
'genre', |
|
34
|
|
|
'inBroadcastLineup', |
|
35
|
|
|
'providesBroadcastService', |
|
36
|
|
|
]; |
|
37
|
|
|
|
|
38
|
|
|
const PROPERTIES_WITH_MULTI_TYPED_ARRAYS = [ |
|
39
|
|
|
'broadcastChannelId' => [ |
|
40
|
|
|
'string', |
|
41
|
|
|
], |
|
42
|
|
|
'broadcastFrequency' => [ |
|
43
|
|
|
'string', |
|
44
|
|
|
BroadcastFrequencySpecification::class, |
|
45
|
|
|
], |
|
46
|
|
|
'broadcastServiceTier' => [ |
|
47
|
|
|
'string', |
|
48
|
|
|
], |
|
49
|
|
|
'genre' => [ |
|
50
|
|
|
'string', |
|
51
|
|
|
], |
|
52
|
|
|
'inBroadcastLineup' => [ |
|
53
|
|
|
Service\CableOrSatelliteService::class, |
|
54
|
|
|
], |
|
55
|
|
|
'providesBroadcastService' => [ |
|
56
|
|
|
Service\BroadcastService::class, |
|
57
|
|
|
], |
|
58
|
|
|
]; |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @return array<int, string> |
|
62
|
|
|
*/ |
|
63
|
4 |
|
public function GetBroadcastChannelId() : array |
|
64
|
|
|
{ |
|
65
|
|
|
/** |
|
66
|
|
|
* @var array<int, string> |
|
67
|
|
|
*/ |
|
68
|
4 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
69
|
4 |
|
'broadcastChannelId', |
|
70
|
4 |
|
$this->RetrievePropertyValueFromData('broadcastChannelId'), |
|
71
|
4 |
|
static::class |
|
72
|
|
|
); |
|
73
|
|
|
|
|
74
|
4 |
|
return $out; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @param array<int, string> $value |
|
79
|
|
|
*/ |
|
80
|
1 |
|
public function SetBroadcastChannelId(array $value) : void |
|
81
|
|
|
{ |
|
82
|
1 |
|
$this->NudgePropertyValue( |
|
83
|
1 |
|
'broadcastChannelId', |
|
84
|
1 |
|
$value, |
|
85
|
1 |
|
Thing::BOOL_DEFAULT_AUTOTRIMSTRINGS |
|
86
|
|
|
); |
|
87
|
1 |
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @return array<int, string> |
|
91
|
|
|
*/ |
|
92
|
4 |
|
public function GetBroadcastServiceTier() : array |
|
93
|
|
|
{ |
|
94
|
|
|
/** |
|
95
|
|
|
* @var array<int, string> |
|
96
|
|
|
*/ |
|
97
|
4 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
98
|
4 |
|
'broadcastServiceTier', |
|
99
|
4 |
|
$this->RetrievePropertyValueFromData('broadcastServiceTier'), |
|
100
|
4 |
|
static::class |
|
101
|
|
|
); |
|
102
|
|
|
|
|
103
|
4 |
|
return $out; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* @param array<int, string> $value |
|
108
|
|
|
*/ |
|
109
|
1 |
|
public function SetBroadcastServiceTier(array $value) : void |
|
110
|
|
|
{ |
|
111
|
1 |
|
$this->NudgePropertyValue( |
|
112
|
1 |
|
'broadcastServiceTier', |
|
113
|
1 |
|
$value, |
|
114
|
1 |
|
Thing::BOOL_DEFAULT_AUTOTRIMSTRINGS |
|
115
|
|
|
); |
|
116
|
1 |
|
} |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* @return array<int, Service\CableOrSatelliteService> |
|
120
|
|
|
*/ |
|
121
|
4 |
|
public function GetInBroadcastLineup() : array |
|
122
|
|
|
{ |
|
123
|
|
|
/** |
|
124
|
|
|
* @var array<int, Service\CableOrSatelliteService> |
|
125
|
|
|
*/ |
|
126
|
4 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
127
|
4 |
|
'inBroadcastLineup', |
|
128
|
4 |
|
$this->RetrievePropertyValueFromData('inBroadcastLineup'), |
|
129
|
4 |
|
static::class |
|
130
|
|
|
); |
|
131
|
|
|
|
|
132
|
4 |
|
return $out; |
|
133
|
|
|
} |
|
134
|
|
|
|
|
135
|
|
|
/** |
|
136
|
|
|
* @param array<int, Service\CableOrSatelliteService> $value |
|
137
|
|
|
*/ |
|
138
|
1 |
|
public function SetInBroadcastLineup(array $value) : void |
|
139
|
|
|
{ |
|
140
|
1 |
|
$this->NudgePropertyValue( |
|
141
|
1 |
|
'inBroadcastLineup', |
|
142
|
1 |
|
$value |
|
143
|
|
|
); |
|
144
|
1 |
|
} |
|
145
|
|
|
|
|
146
|
|
|
/** |
|
147
|
|
|
* @return array<int, Service\BroadcastService> |
|
148
|
|
|
*/ |
|
149
|
4 |
|
public function GetProvidesBroadcastService() : array |
|
150
|
|
|
{ |
|
151
|
|
|
/** |
|
152
|
|
|
* @var array<int, Service\BroadcastService> |
|
153
|
|
|
*/ |
|
154
|
4 |
|
$out = TypeUtilities::ExpectRetrievedValueIsArray( |
|
155
|
4 |
|
'providesBroadcastService', |
|
156
|
4 |
|
$this->RetrievePropertyValueFromData('providesBroadcastService'), |
|
157
|
4 |
|
static::class |
|
158
|
|
|
); |
|
159
|
|
|
|
|
160
|
4 |
|
return $out; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* @param array<int, Service\BroadcastService> $value |
|
165
|
|
|
*/ |
|
166
|
1 |
|
public function SetProvidesBroadcastService(array $value) : void |
|
167
|
|
|
{ |
|
168
|
1 |
|
$this->NudgePropertyValue( |
|
169
|
1 |
|
'providesBroadcastService', |
|
170
|
1 |
|
$value |
|
171
|
|
|
); |
|
172
|
1 |
|
} |
|
173
|
|
|
} |
|
174
|
|
|
|