MimeFilters are now stateless
This commit is contained in:
@ -53,13 +53,14 @@ class SoapKernel
|
||||
*
|
||||
* @param SoapRequest $request Soap request
|
||||
* @param SoapRequestFilter[]|SoapResponseFilter[] $filters
|
||||
* @param int $attachmentType = SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
* @return SoapRequest
|
||||
*/
|
||||
public function filterRequest(SoapRequest $request, array $filters)
|
||||
public function filterRequest(SoapRequest $request, array $filters, $attachmentType)
|
||||
{
|
||||
foreach ($filters as $filter) {
|
||||
if ($filter instanceof SoapRequestFilter) {
|
||||
$request = $filter->filterRequest($request);
|
||||
$request = $filter->filterRequest($request, $attachmentType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,13 +72,14 @@ class SoapKernel
|
||||
*
|
||||
* @param SoapResponse $response SOAP response
|
||||
* @param SoapRequestFilter[]|SoapResponseFilter[] $filters
|
||||
* @param int $attachmentType = SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
* @return SoapResponse
|
||||
*/
|
||||
public function filterResponse(SoapResponse $response, array $filters)
|
||||
public function filterResponse(SoapResponse $response, array $filters, $attachmentType)
|
||||
{
|
||||
foreach ($filters as $filter) {
|
||||
if ($filter instanceof SoapResponseFilter) {
|
||||
$response = $filter->filterResponse($response);
|
||||
$response = $filter->filterResponse($response, $attachmentType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,11 +38,11 @@ class SoapOptions
|
||||
* @param string $encoding = SoapOptions::SOAP_ENCODING_UTF8
|
||||
* @param SoapFeatures $features
|
||||
* @param string $wsdlFile
|
||||
* @param string $wsdlCacheType = SoapOptions::SOAP_CACHE_TYPE_NONE|SoapOptions::SOAP_CACHE_TYPE_MEMORY|SoapOptions::SOAP_CACHE_TYPE_DISK|SoapOptions::SOAP_CACHE_TYPE_DISK_MEMORY
|
||||
* @param string $wsdlCacheDir = null
|
||||
* @param int $wsdlCacheType = SoapOptions::SOAP_CACHE_TYPE_NONE|SoapOptions::SOAP_CACHE_TYPE_MEMORY|SoapOptions::SOAP_CACHE_TYPE_DISK|SoapOptions::SOAP_CACHE_TYPE_DISK_MEMORY
|
||||
* @param string|null $wsdlCacheDir = null
|
||||
* @param ClassMap $classMap
|
||||
* @param TypeConverterCollection $typeConverterCollection
|
||||
* @param string $attachmentType = SoapOptions::SOAP_ATTACHMENTS_OFF|SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
* @param int|null $attachmentType = SoapOptions::SOAP_ATTACHMENTS_OFF|SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
*/
|
||||
public function __construct(
|
||||
$soapVersion,
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
namespace BeSimple\SoapCommon;
|
||||
|
||||
use BeSimple\SoapCommon\SoapRequest;
|
||||
|
||||
/**
|
||||
* SOAP request filter interface.
|
||||
*
|
||||
@ -26,6 +24,7 @@ interface SoapRequestFilter
|
||||
* Modify SOAP response.
|
||||
*
|
||||
* @param SoapRequest $request SOAP request
|
||||
* @param int $attachmentType = SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
*/
|
||||
public function filterRequest(SoapRequest $request);
|
||||
public function filterRequest(SoapRequest $request, $attachmentType);
|
||||
}
|
@ -26,6 +26,7 @@ interface SoapResponseFilter
|
||||
* Modify SOAP response.
|
||||
*
|
||||
* @param SoapResponse $response SOAP response
|
||||
* @param int $attachmentType = SoapOptions::SOAP_ATTACHMENTS_TYPE_SWA|SoapOptions::ATTACHMENTS_TYPE_MTOM|SoapOptions::ATTACHMENTS_TYPE_BASE64
|
||||
*/
|
||||
public function filterResponse(SoapResponse $response);
|
||||
public function filterResponse(SoapResponse $response, $attachmentType);
|
||||
}
|
Reference in New Issue
Block a user