/** * @param $portType \GoetasWebservices\XML\WSDLReader\Wsdl\PortType */ public function addPortType(\GoetasWebservices\XML\WSDLReader\Wsdl\PortType $portType) { $this->portType[$portType->getName()] = $portType; return $this; }
public function __construct(PortType $port, $name) { parent::__construct($port->getDefinition()); $this->name = $name; $this->port = $port; }
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); } }; }