Cleaned code

This commit is contained in:
Francis Besset 2011-08-11 23:55:46 +02:00
parent b4f29373ba
commit a6f8ccbfd2
3 changed files with 15 additions and 15 deletions

View File

@ -101,11 +101,7 @@ class SoapWebServiceController extends ContainerAware
$this->soapRequest->getSoapHeaders()->add( $this->soapRequest->getSoapHeaders()->add(
$this->serviceBinder->processServiceHeader($method, $arguments[0]) $this->serviceBinder->processServiceHeader($method, $arguments[0])
); );
} elseif ($this->serviceBinder->isServiceMethod($method)) {
return;
}
if ($this->serviceBinder->isServiceMethod($method)) {
$this->soapRequest->attributes->add( $this->soapRequest->attributes->add(
$this->serviceBinder->processServiceMethodArguments($method, $arguments) $this->serviceBinder->processServiceMethodArguments($method, $arguments)
); );

View File

@ -62,11 +62,10 @@ class ServiceBinder
{ {
$methodDefinition = $this->definition->getMethods()->get($name); $methodDefinition = $this->definition->getMethods()->get($name);
$result = array(); return array_merge(
$result['_controller'] = $methodDefinition->getController(); array('_controller' => $methodDefinition->getController()),
$result = array_merge($result, $this->requestMessageBinder->processMessage($methodDefinition, $arguments, $this->definition->getDefinitionComplexTypes())); $this->requestMessageBinder->processMessage($methodDefinition, $arguments, $this->definition->getDefinitionComplexTypes())
);
return $result;
} }
public function processServiceMethodReturnValue($name, $return) public function processServiceMethodReturnValue($name, $return)

View File

@ -24,11 +24,6 @@ use Zend\Mime\Message;
*/ */
class SoapRequest extends Request class SoapRequest extends Request
{ {
public static function createFromHttpRequest(Request $request)
{
return new static($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all(), $request->content);
}
/** /**
* @var string * @var string
*/ */
@ -49,6 +44,16 @@ class SoapRequest extends Request
*/ */
protected $soapAttachments; protected $soapAttachments;
/**
* @param \Symfony\Component\HttpFoundation\Request $request
*
* @return SoapRequest
*/
public static function createFromHttpRequest(Request $request)
{
return new static($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all(), $request->content);
}
public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{ {
parent::initialize($query, $request, $attributes, $cookies, $files, $server, $content); parent::initialize($query, $request, $attributes, $cookies, $files, $server, $content);