@@ 141-174 (lines=34) @@ | ||
138 | /** |
|
139 | * @param int|null $max |
|
140 | */ |
|
141 | private function loadSequenceChildNode( |
|
142 | ElementContainer $elementContainer, |
|
143 | DOMElement $node, |
|
144 | DOMElement $childNode, |
|
145 | $max |
|
146 | ) { |
|
147 | switch ($childNode->localName) { |
|
148 | case 'sequence': |
|
149 | case 'choice': |
|
150 | case 'all': |
|
151 | $this->loadSequence( |
|
152 | $elementContainer, |
|
153 | $childNode, |
|
154 | $max |
|
155 | ); |
|
156 | break; |
|
157 | case 'element': |
|
158 | $this->loadSequenceChildNodeLoadElement( |
|
159 | $elementContainer, |
|
160 | $node, |
|
161 | $childNode, |
|
162 | $max |
|
163 | ); |
|
164 | break; |
|
165 | case 'group': |
|
166 | $this->addGroupAsElement( |
|
167 | $elementContainer->getSchema(), |
|
168 | $node, |
|
169 | $childNode, |
|
170 | $elementContainer |
|
171 | ); |
|
172 | break; |
|
173 | } |
|
174 | } |
|
175 | ||
176 | /** |
|
177 | * @param int|null $max |
|
@@ 502-536 (lines=35) @@ | ||
499 | ) { |
|
500 | static::againstDOMNodeList( |
|
501 | $node, |
|
502 | function ( |
|
503 | DOMElement $node, |
|
504 | DOMElement $childNode |
|
505 | ) use ( |
|
506 | $type |
|
507 | ) { |
|
508 | switch ($childNode->localName) { |
|
509 | case 'sequence': |
|
510 | case 'choice': |
|
511 | case 'all': |
|
512 | if ($type instanceof ElementContainer) { |
|
513 | $this->loadSequence( |
|
514 | $type, |
|
515 | $childNode |
|
516 | ); |
|
517 | } |
|
518 | break; |
|
519 | case 'attribute': |
|
520 | $this->addAttributeFromAttributeOrRef( |
|
521 | $type, |
|
522 | $childNode, |
|
523 | $type->getSchema(), |
|
524 | $node |
|
525 | ); |
|
526 | break; |
|
527 | case 'attributeGroup': |
|
528 | $this->findSomethingLikeAttributeGroup( |
|
529 | $type->getSchema(), |
|
530 | $node, |
|
531 | $childNode, |
|
532 | $type |
|
533 | ); |
|
534 | break; |
|
535 | } |
|
536 | } |
|
537 | ); |
|
538 | } |
|
539 |