From 8b10219f7302d7e84e67ac59cba2dc31940c991b Mon Sep 17 00:00:00 2001 From: Andreas Schamberger Date: Sat, 21 Apr 2012 20:24:19 +0200 Subject: [PATCH] =?UTF-8?q?add=20builder=20functions=20f=C3=BCr=20configur?= =?UTF-8?q?ing=20soap=20attachment=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BeSimple/SoapClient/SoapClientBuilder.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/BeSimple/SoapClient/SoapClientBuilder.php b/src/BeSimple/SoapClient/SoapClientBuilder.php index b2ceb61..cce4a9a 100644 --- a/src/BeSimple/SoapClient/SoapClientBuilder.php +++ b/src/BeSimple/SoapClient/SoapClientBuilder.php @@ -193,6 +193,42 @@ class SoapClientBuilder extends AbstractSoapBuilder return $this; } + /** + * SOAP attachment type Base64. + * + * @return \BeSimple\SoapServer\SoapServerBuilder + */ + public function withBase64Attachments() + { + $this->options['attachment_type'] = Helper::ATTACHMENTS_TYPE_BASE64; + + return $this; + } + + /** + * SOAP attachment type SwA. + * + * @return \BeSimple\SoapServer\SoapServerBuilder + */ + public function withSwaAttachments() + { + $this->options['attachment_type'] = Helper::ATTACHMENTS_TYPE_SWA; + + return $this; + } + + /** + * SOAP attachment type MTOM. + * + * @return \BeSimple\SoapServer\SoapServerBuilder + */ + public function withMtomAttachments() + { + $this->options['attachment_type'] = Helper::ATTACHMENTS_TYPE_MTOM; + + return $this; + } + /** * Validate options. */