2011-12-11 21:20:35 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the BeSimpleSoapClient.
|
|
|
|
*
|
|
|
|
* (c) Christian Kerl <christian-kerl@web.de>
|
|
|
|
* (c) Francis Besset <francis.besset@gmail.com>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace BeSimple\SoapClient;
|
|
|
|
|
|
|
|
use BeSimple\SoapCommon\SoapResponse as CommonSoapResponse;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SoapResponse class for SoapClient. Provides factory function for response object.
|
|
|
|
*
|
|
|
|
* @author Andreas Schamberger <mail@andreass.net>
|
|
|
|
*/
|
|
|
|
class SoapResponse extends CommonSoapResponse
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Factory function for SoapResponse.
|
|
|
|
*
|
2011-12-17 16:05:25 +01:00
|
|
|
* @param string $content Content
|
|
|
|
* @param string $location Location
|
|
|
|
* @param string $action SOAP action
|
|
|
|
* @param string $version SOAP version
|
|
|
|
* @param string $contentType Content type header
|
|
|
|
*
|
2016-10-27 16:24:44 +02:00
|
|
|
* @return SoapResponse
|
2011-12-11 21:20:35 +01:00
|
|
|
*/
|
|
|
|
public static function create($content, $location, $action, $version, $contentType)
|
|
|
|
{
|
|
|
|
$response = new SoapResponse();
|
|
|
|
$response->setContent($content);
|
|
|
|
$response->setLocation($location);
|
|
|
|
$response->setAction($action);
|
|
|
|
$response->setVersion($version);
|
|
|
|
$response->setContentType($contentType);
|
|
|
|
|
|
|
|
return $response;
|
|
|
|
}
|
2013-12-02 15:14:06 +01:00
|
|
|
}
|