Add minOccurs and maxOccurs into wsdl dumper

This commit is contained in:
Gianluigi 'cocciagialla' Mammarella 2019-06-26 19:22:09 +02:00
parent d1f5c1f674
commit a7a49b793a
1 changed files with 4 additions and 0 deletions

View File

@ -278,11 +278,15 @@ class Dumper
if ($child->isNillable()) {
$element->setAttribute('minOccurs', 0);
} else {
$element->setAttribute('minOccurs', 1);
}
if ($type instanceof ArrayOfType || $isArray) {
$element->setAttribute('minOccurs', 0);
$element->setAttribute('maxOccurs', 'unbounded');
} else {
$element->setAttribute('maxOccurs', 1);
}
if ($child->isAttribute()) {