| @@ 152-168 (lines=17) @@ | ||
| 149 | * $end |
|
| 150 | * @return self |
|
| 151 | */ |
|
| 152 | public function setEnd(array $end) |
|
| 153 | { |
|
| 154 | $msg = null; |
|
| 155 | if (!$this->isValidArrayOK( |
|
| 156 | $end, |
|
| 157 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\EntityContainer\AssociationSetAnonymousType\EndAnonymousType', |
|
| 158 | $msg, |
|
| 159 | 0, |
|
| 160 | 2 |
|
| 161 | ) |
|
| 162 | ) { |
|
| 163 | throw new \InvalidArgumentException($msg); |
|
| 164 | } |
|
| 165 | ||
| 166 | $this->end = $end; |
|
| 167 | return $this; |
|
| 168 | } |
|
| 169 | ||
| 170 | public function isOK(&$msg = null) |
|
| 171 | { |
|
| @@ 131-144 (lines=14) @@ | ||
| 128 | * $end |
|
| 129 | * @return self |
|
| 130 | */ |
|
| 131 | public function setEnd(array $end) |
|
| 132 | { |
|
| 133 | $msg = null; |
|
| 134 | if (!$this->isValidArrayOK( |
|
| 135 | $end, |
|
| 136 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType\EndAnonymousType', |
|
| 137 | $msg |
|
| 138 | ) |
|
| 139 | ) { |
|
| 140 | throw new \InvalidArgumentException($msg); |
|
| 141 | } |
|
| 142 | $this->end = $end; |
|
| 143 | return $this; |
|
| 144 | } |
|
| 145 | ||
| 146 | public function isOK(&$msg = null) |
|
| 147 | { |
|
| @@ 146-161 (lines=16) @@ | ||
| 143 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TAssociationEndType[] $end |
|
| 144 | * @return self |
|
| 145 | */ |
|
| 146 | public function setEnd(array $end) |
|
| 147 | { |
|
| 148 | $msg = null; |
|
| 149 | if (!$this->isValidArrayOK( |
|
| 150 | $end, |
|
| 151 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TAssociationEndType', |
|
| 152 | $msg, |
|
| 153 | 2, |
|
| 154 | 2 |
|
| 155 | ) |
|
| 156 | ) { |
|
| 157 | throw new \InvalidArgumentException($msg); |
|
| 158 | } |
|
| 159 | $this->end = $end; |
|
| 160 | return $this; |
|
| 161 | } |
|
| 162 | ||
| 163 | /** |
|
| 164 | * Gets as referentialConstraint |
|
| @@ 139-153 (lines=15) @@ | ||
| 136 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType[] $key |
|
| 137 | * @return self |
|
| 138 | */ |
|
| 139 | public function setKey(array $key) |
|
| 140 | { |
|
| 141 | $msg = null; |
|
| 142 | if (!$this->isValidArrayOK( |
|
| 143 | $key, |
|
| 144 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TPropertyRefType', |
|
| 145 | $msg, |
|
| 146 | 1 |
|
| 147 | ) |
|
| 148 | ) { |
|
| 149 | throw new \InvalidArgumentException($msg); |
|
| 150 | } |
|
| 151 | $this->key = $key; |
|
| 152 | return $this; |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Adds as property |
|
| @@ 152-166 (lines=15) @@ | ||
| 149 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\Schema[] $dataServices |
|
| 150 | * @return self |
|
| 151 | */ |
|
| 152 | public function setSchema(array $dataServices) |
|
| 153 | { |
|
| 154 | if (!$this->isValidArrayOK( |
|
| 155 | $dataServices, |
|
| 156 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\Schema', |
|
| 157 | $msg, |
|
| 158 | 1 |
|
| 159 | ) |
|
| 160 | ) { |
|
| 161 | $msg = "Data services array not a valid array"; |
|
| 162 | throw new \InvalidArgumentException($msg); |
|
| 163 | } |
|
| 164 | $this->schema = $dataServices; |
|
| 165 | return $this; |
|
| 166 | } |
|
| 167 | ||
| 168 | public function isOK(&$msg = null) |
|
| 169 | { |
|