| @@ 140-163 (lines=24) @@ | ||
| 137 | return $this; |
|
| 138 | } |
|
| 139 | ||
| 140 | public function isOK(&$msg = null) |
|
| 141 | { |
|
| 142 | if (!$this->isTSimpleIdentifierValid($this->name)) { |
|
| 143 | $msg = "Name must be a valid TSimpleIdentifier"; |
|
| 144 | return false; |
|
| 145 | } |
|
| 146 | if (!$this->isTQualifiedNameValid($this->association)) { |
|
| 147 | $msg = "Association must be a valid TQualifiedName"; |
|
| 148 | return false; |
|
| 149 | } |
|
| 150 | if (!$this->isValidArrayOK( |
|
| 151 | $this->end, |
|
| 152 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\EntityContainer\AssociationSetAnonymousType\EndAnonymousType', |
|
| 153 | $msg, |
|
| 154 | 0, |
|
| 155 | 2 |
|
| 156 | )) { |
|
| 157 | return false; |
|
| 158 | } |
|
| 159 | if (!$this->isExtensibilityElementOK($msg)) { |
|
| 160 | return false; |
|
| 161 | } |
|
| 162 | return true; |
|
| 163 | } |
|
| 164 | } |
|
| 165 | ||
| @@ 253-285 (lines=33) @@ | ||
| 250 | return $this; |
|
| 251 | } |
|
| 252 | ||
| 253 | public function isBodyElementsOK(&$msg = null) |
|
| 254 | { |
|
| 255 | if (!$this->isValidArrayOK( |
|
| 256 | $this->association, |
|
| 257 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TAssociationType', |
|
| 258 | $msg |
|
| 259 | )) { |
|
| 260 | return false; |
|
| 261 | } |
|
| 262 | if (!$this->isValidArrayOK( |
|
| 263 | $this->entityType, |
|
| 264 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TEntityTypeType', |
|
| 265 | $msg |
|
| 266 | )) { |
|
| 267 | return false; |
|
| 268 | } |
|
| 269 | if (!$this->isValidArrayOK( |
|
| 270 | $this->entityContainer, |
|
| 271 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer', |
|
| 272 | $msg, |
|
| 273 | 1 |
|
| 274 | )) { |
|
| 275 | return false; |
|
| 276 | } |
|
| 277 | if (!$this->isValidArrayOK( |
|
| 278 | $this->function, |
|
| 279 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TFunctionType', |
|
| 280 | $msg |
|
| 281 | )) { |
|
| 282 | return false; |
|
| 283 | } |
|
| 284 | return true; |
|
| 285 | } |
|
| 286 | } |
|
| 287 | ||