@@ 193-219 (lines=27) @@ | ||
190 | return $this; |
|
191 | } |
|
192 | ||
193 | public function isOK(&$msg = null) |
|
194 | { |
|
195 | if (!$this->isStringNotNullOrEmpty($this->name)) { |
|
196 | $msg = "Name cannot be null or empty"; |
|
197 | return false; |
|
198 | } |
|
199 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
200 | return false; |
|
201 | } |
|
202 | if (!$this->isValidArrayOK( |
|
203 | $this->key, |
|
204 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType', |
|
205 | $msg, |
|
206 | 1 |
|
207 | )) { |
|
208 | return false; |
|
209 | } |
|
210 | if (!$this->isValidArrayOK( |
|
211 | $this->property, |
|
212 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TEntityPropertyType', |
|
213 | $msg |
|
214 | )) { |
|
215 | return false; |
|
216 | } |
|
217 | ||
218 | return true; |
|
219 | } |
|
220 | } |
|
221 |
@@ 132-154 (lines=23) @@ | ||
129 | return $this; |
|
130 | } |
|
131 | ||
132 | public function isOK(&$msg = null) |
|
133 | { |
|
134 | if (!$this->isStringNotNullOrEmpty($this->role)) { |
|
135 | $msg = "Role cannot be empty or null"; |
|
136 | return false; |
|
137 | } |
|
138 | if (!$this->isTSimpleIdentifierValid($this->role)) { |
|
139 | $msg = "Role must be valid TSimpleIdentifier"; |
|
140 | return false; |
|
141 | } |
|
142 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
143 | return false; |
|
144 | } |
|
145 | if (!$this->isValidArrayOK( |
|
146 | $this->propertyRef, |
|
147 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType', |
|
148 | $msg, |
|
149 | 1 |
|
150 | )) { |
|
151 | return false; |
|
152 | } |
|
153 | return true; |
|
154 | } |
|
155 | } |
|
156 |