| @@ 579-599 (lines=21) @@ | ||
| 576 | $schema->addType($type); |
|
| 577 | } |
|
| 578 | ||
| 579 | return function () use ($type, $node, $schema, $callback) { |
|
| 580 | $this->runCallbackAgainstDOMNodeList( |
|
| 581 | $type, |
|
| 582 | $node, |
|
| 583 | function ( |
|
| 584 | DOMElement $node, |
|
| 585 | DOMElement $childNode |
|
| 586 | ) use( |
|
| 587 | $schema, |
|
| 588 | $type |
|
| 589 | ) { |
|
| 590 | $this->loadComplexTypeFromChildNode( |
|
| 591 | $type, |
|
| 592 | $node, |
|
| 593 | $childNode, |
|
| 594 | $schema |
|
| 595 | ); |
|
| 596 | }, |
|
| 597 | $callback |
|
| 598 | ); |
|
| 599 | }; |
|
| 600 | } |
|
| 601 | ||
| 602 | /** |
|
| @@ 694-715 (lines=22) @@ | ||
| 691 | 'list' => 'loadList', |
|
| 692 | ]; |
|
| 693 | ||
| 694 | return function () use ($type, $node, $callback, $methods) { |
|
| 695 | $this->runCallbackAgainstDOMNodeList( |
|
| 696 | $type, |
|
| 697 | $node, |
|
| 698 | function ( |
|
| 699 | DOMElement $node, |
|
| 700 | DOMElement $childNode |
|
| 701 | ) use ( |
|
| 702 | $methods, |
|
| 703 | $type |
|
| 704 | ) { |
|
| 705 | $this->maybeCallMethod( |
|
| 706 | $methods, |
|
| 707 | $childNode->localName, |
|
| 708 | $childNode, |
|
| 709 | $type, |
|
| 710 | $childNode |
|
| 711 | ); |
|
| 712 | }, |
|
| 713 | $callback |
|
| 714 | ); |
|
| 715 | }; |
|
| 716 | } |
|
| 717 | ||
| 718 | private function loadList(SimpleType $type, DOMElement $node) |
|