/** * @param $binding \GoetasWebservices\XML\WSDLReader\Wsdl\Binding */ public function addBinding(\GoetasWebservices\XML\WSDLReader\Wsdl\Binding $binding) { $this->binding[$binding->getName()] = $binding; return $this; }
public function __construct(Binding $binding, $name) { parent::__construct($binding->getDefinition()); $this->name = $name; $this->binding = $binding; }
private function loadBindingOperation(Binding $binding, DOMElement $node) { $bindingOperation = new BindingOperation($binding, $node->getAttribute("name")); $bindingOperation->setDocumentation($this->getDocumentation($node)); $binding->addOperation($bindingOperation); $functions = array(); foreach ($this->loop($node) as $childNode) { switch ($childNode->localName) { case 'input': $functions[] = $this->loadBindingOperationMessage($bindingOperation, $childNode, true); break; case 'output': $functions[] = $this->loadBindingOperationMessage($bindingOperation, $childNode, false); break; case 'fault': $functions[] = $this->loadBindingOperationFault($bindingOperation, $childNode); break; } } return function () use($functions, $bindingOperation, $node) { $this->dispatcher->dispatch('binding.operation', new BindingOperationEvent($bindingOperation, $node)); foreach ($functions as $function) { call_user_func($function); } }; }