Esempio n. 1
0
 private function _generateTypedArray(TypesComplex $parameter, $schemaElement)
 {
     $name = $parameter->getName();
     $type = $parameter->getArrayType();
     $typeName = $parameter->getArrayTypeName();
     if (self::isAlreadyGenerated($name)) {
         return;
     }
     $complexTypeElement = $this->createElementWithAttributes('xsd:complexType', array('name' => $name));
     $sequence = $this->_createElement('xsd:sequence');
     $element = $this->createElementWithAttributes('xsd:element', array('minOccurs' => 0, 'maxOccurs' => 'unbounded', 'name' => $typeName, 'nillable' => 'true', 'type' => str_replace('[]', '', $type)));
     $sequence->appendChild($element);
     $complexTypeElement->appendChild($sequence);
     $schemaElement->appendChild($complexTypeElement);
     if ($parameter->getComplex()) {
         $this->_generateComplexType($parameter->getComplex(), $schemaElement);
     }
 }