Deleted unused namespace and added PHPDoc on ServiceBinder

This commit is contained in:
Francis Besset 2011-09-01 21:15:40 +02:00
parent faf8b58108
commit e9864b1d02
1 changed files with 36 additions and 1 deletions

View File

@ -13,7 +13,6 @@ namespace BeSimple\SoapBundle\ServiceBinding;
use BeSimple\SoapBundle\ServiceDefinition\Header; use BeSimple\SoapBundle\ServiceDefinition\Header;
use BeSimple\SoapBundle\ServiceDefinition\ServiceDefinition; use BeSimple\SoapBundle\ServiceDefinition\ServiceDefinition;
use BeSimple\SoapBundle\Soap\SoapHeader; use BeSimple\SoapBundle\Soap\SoapHeader;
use BeSimple\SoapBundle\Util\QName;
/** /**
* @author Christian Kerl <christian-kerl@web.de> * @author Christian Kerl <christian-kerl@web.de>
@ -40,6 +39,12 @@ class ServiceBinder
*/ */
private $responseMessageBinder; private $responseMessageBinder;
/**
* @param ServiceDefinition $definition
* @param MessageBinderInterface $requestHeaderMessageBinder
* @param MessageBinderInterface $requestMessageBinder
* @param MessageBinderInterface $responseMessageBinder
*/
public function __construct(ServiceDefinition $definition, MessageBinderInterface $requestHeaderMessageBinder, MessageBinderInterface $requestMessageBinder, MessageBinderInterface $responseMessageBinder) { public function __construct(ServiceDefinition $definition, MessageBinderInterface $requestHeaderMessageBinder, MessageBinderInterface $requestMessageBinder, MessageBinderInterface $responseMessageBinder) {
$this->definition = $definition; $this->definition = $definition;
@ -49,16 +54,34 @@ class ServiceBinder
$this->responseMessageBinder = $responseMessageBinder; $this->responseMessageBinder = $responseMessageBinder;
} }
/**
* @param string $method
* @param string $header
*
* @return boolean
*/
public function isServiceHeader($method, $header) public function isServiceHeader($method, $header)
{ {
return $this->definition->getMethods()->get($method)->getHeaders()->has($header); return $this->definition->getMethods()->get($method)->getHeaders()->has($header);
} }
/**
* @param $string
*
* @return boolean
*/
public function isServiceMethod($method) public function isServiceMethod($method)
{ {
return $this->definition->getMethods()->has($method); return $this->definition->getMethods()->has($method);
} }
/**
* @param string $method
* @param string $header
* @param mixed $data
*
* @return SoapHeader
*/
public function processServiceHeader($method, $header, $data) public function processServiceHeader($method, $header, $data)
{ {
$methodDefinition = $this->definition->getMethods()->get($method); $methodDefinition = $this->definition->getMethods()->get($method);
@ -70,6 +93,12 @@ class ServiceBinder
return new SoapHeader($this->definition->getNamespace(), $headerDefinition->getName(), $data); return new SoapHeader($this->definition->getNamespace(), $headerDefinition->getName(), $data);
} }
/**
* @param string $method
* @param array $arguments
*
* @return array
*/
public function processServiceMethodArguments($method, $arguments) public function processServiceMethodArguments($method, $arguments)
{ {
$methodDefinition = $this->definition->getMethods()->get($method); $methodDefinition = $this->definition->getMethods()->get($method);
@ -80,6 +109,12 @@ class ServiceBinder
); );
} }
/**
* @param string $name
* @param mixed
*
* @return mixed
*/
public function processServiceMethodReturnValue($name, $return) public function processServiceMethodReturnValue($name, $return)
{ {
$methodDefinition = $this->definition->getMethods()->get($name); $methodDefinition = $this->definition->getMethods()->get($name);