@@ 205-233 (lines=29) @@ | ||
202 | ||
203 | $join = $this->getJoin(); |
|
204 | $split = $this->getSplit(); |
|
205 | if (null !== $join && 0 !== $join) { |
|
206 | $descriptor->setAttribute('join', $join); |
|
207 | } elseif (null !== $split && 0 !== $split) { |
|
208 | $descriptor->setAttribute('split', $split); |
|
209 | } else { |
|
210 | $status = $this->getStatus(); |
|
211 | if (null === $status) { |
|
212 | $errMsg = 'Некорректное значение для атрибута status'; |
|
213 | throw new InvalidDescriptorException($errMsg); |
|
214 | } |
|
215 | $descriptor->setAttribute('status', $status); |
|
216 | ||
217 | $step = $this->getStep(); |
|
218 | if (null === $step) { |
|
219 | $errMsg = 'Некорректное значение для атрибута step'; |
|
220 | throw new InvalidDescriptorException($errMsg); |
|
221 | } |
|
222 | $descriptor->setAttribute('step', $step); |
|
223 | ||
224 | $owner = $this->getOwner(); |
|
225 | if (null !== $owner && is_string($owner) && strlen($owner) > 0) { |
|
226 | $descriptor->setAttribute('owner', $owner); |
|
227 | } |
|
228 | ||
229 | $displayName = $this->getDisplayName(); |
|
230 | if (null !== $displayName && is_string($displayName) && strlen($displayName) > 0) { |
|
231 | $descriptor->setAttribute('display-name', $displayName); |
|
232 | } |
|
233 | } |
|
234 | ||
235 | ||
236 | foreach ($this->getConditions() as $condition) { |
@@ 498-526 (lines=29) @@ | ||
495 | ||
496 | $join = $this->getJoin(); |
|
497 | $split = $this->getSplit(); |
|
498 | if (null !== $join && 0 !== $join) { |
|
499 | $descriptor->setAttribute('join', $join); |
|
500 | } elseif (null !== $split && 0 !== $split) { |
|
501 | $descriptor->setAttribute('split', $split); |
|
502 | } else { |
|
503 | $status = $this->getStatus(); |
|
504 | if (null === $status) { |
|
505 | $errMsg = 'Некорректное значение для атрибута status'; |
|
506 | throw new InvalidDescriptorException($errMsg); |
|
507 | } |
|
508 | $descriptor->setAttribute('status', $status); |
|
509 | ||
510 | $step = $this->getStep(); |
|
511 | if (null === $step) { |
|
512 | $errMsg = 'Некорректное значение для атрибута step'; |
|
513 | throw new InvalidDescriptorException($errMsg); |
|
514 | } |
|
515 | $descriptor->setAttribute('step', $step); |
|
516 | ||
517 | $owner = $this->getOwner(); |
|
518 | if (null !== $owner && is_string($owner) && strlen($owner) > 0) { |
|
519 | $descriptor->setAttribute('owner', $owner); |
|
520 | } |
|
521 | ||
522 | $displayName = $this->getDisplayName(); |
|
523 | if (null !== $displayName && is_string($displayName) && strlen($displayName) > 0) { |
|
524 | $descriptor->setAttribute('display-name', $displayName); |
|
525 | } |
|
526 | } |
|
527 | ||
528 | $validators = $this->getValidators(); |
|
529 | if ($validators->count() > 0) { |