Ejemplo n.º 1
0
 private function loadPortTypeOperation(PortType $port, DOMElement $node)
 {
     $operation = new Operation($port, $node->getAttribute("name"));
     $operation->setDocumentation($this->getDocumentation($node));
     $operation->setParameterOrder($node->getAttribute("parameterOrder") ?: null);
     $port->addOperation($operation);
     $functions = array();
     foreach ($this->loop($node) as $childNode) {
         switch ($childNode->localName) {
             case 'input':
                 $functions[] = $this->loadParam($operation, $childNode, true);
                 break;
             case 'output':
                 $functions[] = $this->loadParam($operation, $childNode, false);
                 break;
             case 'fault':
                 $functions[] = $this->loadFault($operation, $childNode);
                 break;
         }
     }
     return function () use($functions, $operation, $node) {
         $this->dispatcher->dispatch('portType.operation', new OperationEvent($operation, $node));
         foreach ($functions as $function) {
             call_user_func($function);
         }
     };
 }