2010-10-05 21:44:30 +02:00
|
|
|
<?php
|
|
|
|
/*
|
2011-07-18 22:43:12 +02:00
|
|
|
* This file is part of the BeSimpleSoapBundle.
|
2010-10-05 21:44:30 +02:00
|
|
|
*
|
|
|
|
* (c) Christian Kerl <christian-kerl@web.de>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
|
|
|
|
2011-07-18 22:43:12 +02:00
|
|
|
namespace BeSimple\SoapBundle\Soap;
|
2010-10-05 21:44:30 +02:00
|
|
|
|
2011-07-18 22:43:12 +02:00
|
|
|
use BeSimple\SoapBundle\Util\Collection;
|
2010-10-07 15:16:56 +02:00
|
|
|
|
2010-10-05 21:44:30 +02:00
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SoapResponse.
|
|
|
|
*
|
|
|
|
* @author Christian Kerl <christian-kerl@web.de>
|
|
|
|
*/
|
|
|
|
class SoapResponse extends Response
|
|
|
|
{
|
2010-10-07 15:16:56 +02:00
|
|
|
/**
|
2011-07-18 22:43:12 +02:00
|
|
|
* @var \BeSimple\SoapBundle\Util\Collection
|
2010-10-07 15:16:56 +02:00
|
|
|
*/
|
2010-10-05 21:44:30 +02:00
|
|
|
protected $soapHeaders;
|
|
|
|
|
2010-10-08 14:24:42 +02:00
|
|
|
/**
|
|
|
|
* @var mixed
|
|
|
|
*/
|
2010-10-05 21:44:30 +02:00
|
|
|
protected $soapReturnValue;
|
|
|
|
|
2010-10-07 15:16:56 +02:00
|
|
|
public function __construct($returnValue = null)
|
2010-10-05 21:44:30 +02:00
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
2011-07-18 22:43:12 +02:00
|
|
|
$this->soapHeaders = new Collection('getName', 'BeSimple\SoapBundle\Soap\SoapHeader');
|
2010-10-07 15:16:56 +02:00
|
|
|
$this->setReturnValue($returnValue);
|
2010-10-05 21:44:30 +02:00
|
|
|
}
|
|
|
|
|
2011-08-11 00:59:40 +02:00
|
|
|
/**
|
|
|
|
* @param SoapHeader $soapHeader
|
|
|
|
*/
|
|
|
|
public function addSoapHeader(SoapHeader $soapHeader)
|
|
|
|
{
|
|
|
|
$this->soapHeaders->add($soapHeader);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return \BeSimple\SoapBundle\Util\Collection
|
|
|
|
*/
|
2010-10-07 15:16:56 +02:00
|
|
|
public function getSoapHeaders()
|
2010-10-05 21:44:30 +02:00
|
|
|
{
|
2010-10-07 15:16:56 +02:00
|
|
|
return $this->soapHeaders;
|
2010-10-05 21:44:30 +02:00
|
|
|
}
|
|
|
|
|
2010-10-07 15:16:56 +02:00
|
|
|
public function setReturnValue($value)
|
2010-10-05 21:44:30 +02:00
|
|
|
{
|
2010-10-07 15:16:56 +02:00
|
|
|
$this->soapReturnValue = $value;
|
2010-10-05 21:44:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getReturnValue()
|
|
|
|
{
|
|
|
|
return $this->soapReturnValue;
|
|
|
|
}
|
|
|
|
}
|