1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AlgoWeb\ODataMetadata\App; |
4
|
|
|
|
5
|
|
|
use AlgoWeb\ODataMetadata\IsOK; |
6
|
|
|
use AlgoWeb\ODataMetadata\IsOKTraits\IsOKToolboxTrait; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class representing AppCollectionType |
10
|
|
|
* |
11
|
|
|
* |
12
|
|
|
* XSD Type: appCollectionType |
13
|
|
|
*/ |
14
|
|
|
class AppCollectionType extends IsOK |
15
|
|
|
{ |
16
|
|
|
use IsOKToolboxTrait, XSDTopLevelTrait; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @property string $href |
20
|
|
|
*/ |
21
|
|
|
private $href = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @property \AlgoWeb\ODataMetadata\Atom\Title $title |
25
|
|
|
*/ |
26
|
|
|
private $title = null; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @property string[] $accept |
30
|
|
|
*/ |
31
|
|
|
private $accept = array(); |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @property \AlgoWeb\ODataMetadata\App\AppCategoriesType[] $categories |
35
|
|
|
*/ |
36
|
|
|
private $categories = array(); |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Gets as href |
40
|
|
|
* |
41
|
|
|
* @return string |
42
|
|
|
*/ |
43
|
|
|
public function getHref() |
44
|
|
|
{ |
45
|
|
|
return $this->href; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Sets a new href |
50
|
|
|
* |
51
|
|
|
* @param string $href |
52
|
|
|
* @return self |
53
|
|
|
*/ |
54
|
|
|
public function setHref($href) |
55
|
|
|
{ |
56
|
|
|
$this->href = $href; |
57
|
|
|
return $this; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Gets as title |
62
|
|
|
* |
63
|
|
|
* @return \AlgoWeb\ODataMetadata\Atom\Title |
64
|
|
|
*/ |
65
|
|
|
public function getTitle() |
66
|
|
|
{ |
67
|
|
|
return $this->title; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Sets a new title |
72
|
|
|
* |
73
|
|
|
* @param \AlgoWeb\ODataMetadata\Atom\Title $title |
74
|
|
|
* @return self |
75
|
|
|
*/ |
76
|
|
|
public function setTitle(\AlgoWeb\ODataMetadata\Atom\Title $title) |
77
|
|
|
{ |
78
|
|
|
$this->title = $title; |
79
|
|
|
return $this; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Adds as accept |
84
|
|
|
* |
85
|
|
|
* @return self |
86
|
|
|
* @param string $accept |
87
|
|
|
*/ |
88
|
|
|
public function addToAccept($accept) |
89
|
|
|
{ |
90
|
|
|
$this->accept[] = $accept; |
91
|
|
|
return $this; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* isset accept |
96
|
|
|
* |
97
|
|
|
* @param scalar $index |
98
|
|
|
* @return boolean |
99
|
|
|
*/ |
100
|
|
|
public function issetAccept($index) |
101
|
|
|
{ |
102
|
|
|
return isset($this->accept[$index]); |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* unset accept |
107
|
|
|
* |
108
|
|
|
* @param scalar $index |
109
|
|
|
* @return void |
110
|
|
|
*/ |
111
|
|
|
public function unsetAccept($index) |
112
|
|
|
{ |
113
|
|
|
unset($this->accept[$index]); |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Gets as accept |
118
|
|
|
* |
119
|
|
|
* @return string[] |
120
|
|
|
*/ |
121
|
|
|
public function getAccept() |
122
|
|
|
{ |
123
|
|
|
return $this->accept; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* Sets a new accept |
128
|
|
|
* |
129
|
|
|
* @param string[] $accept |
130
|
|
|
* @return self |
131
|
|
|
*/ |
132
|
|
|
public function setAccept(array $accept) |
133
|
|
|
{ |
134
|
|
|
$this->accept = $accept; |
135
|
|
|
return $this; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* Adds as categories |
140
|
|
|
* |
141
|
|
|
* @return self |
142
|
|
|
* @param \AlgoWeb\ODataMetadata\App\AppCategoriesType $categories |
143
|
|
|
*/ |
144
|
|
|
public function addToCategories(\AlgoWeb\ODataMetadata\App\AppCategoriesType $categories) |
145
|
|
|
{ |
146
|
|
|
$this->categories[] = $categories; |
147
|
|
|
return $this; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* isset categories |
152
|
|
|
* |
153
|
|
|
* @param scalar $index |
154
|
|
|
* @return boolean |
155
|
|
|
*/ |
156
|
|
|
public function issetCategories($index) |
157
|
|
|
{ |
158
|
|
|
return isset($this->categories[$index]); |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* unset categories |
163
|
|
|
* |
164
|
|
|
* @param scalar $index |
165
|
|
|
* @return void |
166
|
|
|
*/ |
167
|
|
|
public function unsetCategories($index) |
168
|
|
|
{ |
169
|
|
|
unset($this->categories[$index]); |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Gets as categories |
174
|
|
|
* |
175
|
|
|
* @return \AlgoWeb\ODataMetadata\App\AppCategoriesType[] |
176
|
|
|
*/ |
177
|
|
|
public function getCategories() |
178
|
|
|
{ |
179
|
|
|
return $this->categories; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* Sets a new categories |
184
|
|
|
* |
185
|
|
|
* @param \AlgoWeb\ODataMetadata\App\AppCategoriesType[] $categories |
186
|
|
|
* @return self |
187
|
|
|
*/ |
188
|
|
|
public function setCategories(array $categories) |
189
|
|
|
{ |
190
|
|
|
$this->categories = $categories; |
191
|
|
|
return $this; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
public function isOK(&$msg = null) |
195
|
|
|
{ |
196
|
|
|
if (!$this->isNotNullInstanceOf($this->title, '\AlgoWeb\ODataMetadata\Atom\Title')) { |
197
|
|
|
$msg = "AppCollectionType Title Must be set to an instance of \AlgoWeb\ODataMetadata\Atom\Title"; |
198
|
|
|
} |
199
|
|
|
if (!$this->title->isOK($msg)) { |
|
|
|
|
200
|
|
|
return false; |
201
|
|
|
} |
202
|
|
|
if (!$this->isValidArrayOK($this->categories, '\AlgoWeb\ODataMetadata\App\AppCategoriesType', $msg)) { |
203
|
|
|
return false; |
204
|
|
|
} |
205
|
|
|
} |
206
|
|
|
} |
207
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.