From 642c50c051597239b8d82c1e7827b4ff4bba504b Mon Sep 17 00:00:00 2001 From: Christian Kerl Date: Thu, 29 Sep 2011 13:32:01 +0200 Subject: [PATCH] added method to SoapServerBuilder to disable wsdl caching --- src/BeSimple/SoapServer/SoapServerBuilder.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/BeSimple/SoapServer/SoapServerBuilder.php b/src/BeSimple/SoapServer/SoapServerBuilder.php index 61b51cf..7536157 100644 --- a/src/BeSimple/SoapServer/SoapServerBuilder.php +++ b/src/BeSimple/SoapServer/SoapServerBuilder.php @@ -32,6 +32,7 @@ class SoapServerBuilder $builder ->withSoapVersion12() ->withEncoding('UTF-8') + ->withNoWsdlCache() ->withErrorReporting(false) ->withSingleElementArrays() ; @@ -49,7 +50,7 @@ class SoapServerBuilder private $optionHandlerObject = null; /** - * Initializes all options with the defaults in the native SoapServer. + * Initializes all options with the defaults used in the native SoapServer. */ private function __construct() { @@ -159,6 +160,13 @@ class SoapServerBuilder return $this; } + public function withNoWsdlCache() + { + $this->options['cache_wsdl'] = Cache::TYPE_NONE; + + return $this; + } + public function withWsdlDiskCache() { $this->options['cache_wsdl'] = Cache::TYPE_DISK; @@ -237,7 +245,7 @@ class SoapServerBuilder if(is_string($handler) && class_exists($handler)) { $this->optionHandlerClass = $handler; - $this->optionHandlerObject = null; + $this->optionHandlerObject = null; } if(is_object($handler))