Large refactoring removing states, abstract magic, vague fluent interfaces

This commit is contained in:
Petr Bechyně
2016-10-27 16:24:44 +02:00
parent c4a9b58b08
commit 0a157748a8
32 changed files with 953 additions and 933 deletions

View File

@ -29,10 +29,11 @@ class SoapResponse extends CommonSoapResponse
* @param string $location Location
* @param string $action SOAP action
* @param string $version SOAP version
* @param array $attachments SOAP attachments
*
* @return BeSimple\SoapClient\SoapResponse
* @return SoapResponse
*/
public static function create($content, $location, $action, $version)
public static function create($content, $location, $action, $version, $attachments = [])
{
$response = new SoapResponse();
$response->setContent($content);
@ -48,12 +49,11 @@ class SoapResponse extends CommonSoapResponse
/**
* Send SOAP response to client.
*/
public function send()
public function getResponseContent()
{
// set Content-Type header
header('Content-Type: '.$this->getContentType());
header('Content-Type: ' . $this->getContentType());
// send content to client
echo $this->getContent();
return $this->getContent();
}
}