Add 'src/BeSimple/SoapBundle/' from commit 'e99f707b105c0a0472260d8d42a5a14a7fb7a211'
git-subtree-dir: src/BeSimple/SoapBundle git-subtree-mainline:9a8d23fa23
git-subtree-split:e99f707b10
This commit is contained in:
69
src/BeSimple/SoapBundle/Soap/SoapResponse.php
Normal file
69
src/BeSimple/SoapBundle/Soap/SoapResponse.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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.
|
||||
*/
|
||||
|
||||
namespace BeSimple\SoapBundle\Soap;
|
||||
|
||||
use BeSimple\SoapBundle\Util\Collection;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* SoapResponse.
|
||||
*
|
||||
* @author Christian Kerl <christian-kerl@web.de>
|
||||
*/
|
||||
class SoapResponse extends Response
|
||||
{
|
||||
/**
|
||||
* @var \BeSimple\SoapBundle\Util\Collection
|
||||
*/
|
||||
protected $soapHeaders;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
protected $soapReturnValue;
|
||||
|
||||
public function __construct($returnValue = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->soapHeaders = new Collection('getName', 'BeSimple\SoapBundle\Soap\SoapHeader');
|
||||
$this->setReturnValue($returnValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SoapHeader $soapHeader
|
||||
*/
|
||||
public function addSoapHeader(SoapHeader $soapHeader)
|
||||
{
|
||||
$this->soapHeaders->add($soapHeader);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \BeSimple\SoapBundle\Util\Collection
|
||||
*/
|
||||
public function getSoapHeaders()
|
||||
{
|
||||
return $this->soapHeaders;
|
||||
}
|
||||
|
||||
public function setReturnValue($value)
|
||||
{
|
||||
$this->soapReturnValue = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getReturnValue()
|
||||
{
|
||||
return $this->soapReturnValue;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user