Пример #1
0
 /**
  * @param $part \GoetasWebservices\XML\WSDLReader\Wsdl\Message\Part
  */
 public function addPart(\GoetasWebservices\XML\WSDLReader\Wsdl\Message\Part $part)
 {
     if ($part->getName()) {
         $this->part[$part->getName()] = $part;
     } else {
         $this->part[] = $part;
     }
     return $this;
 }
Пример #2
0
 private function loadMessagePart(Message $message, DOMElement $node)
 {
     $part = new Part($message, $node->getAttribute("name"));
     $part->setDocumentation($this->getDocumentation($node));
     $message->addPart($part);
     return function () use($part, $node) {
         if ($node->hasAttribute("element")) {
             list($name, $ns) = self::splitParts($node, $node->getAttribute("element"));
             $part->setElement($part->getDefinition()->getSchema()->findElement($name, $ns));
         } elseif ($node->hasAttribute("type")) {
             list($name, $ns) = self::splitParts($node, $node->getAttribute("type"));
             $part->setType($part->getDefinition()->getSchema()->findType($name, $ns));
         }
         $this->dispatcher->dispatch('message.part', new MessagePartEvent($part, $node));
     };
 }