added method to SoapServerBuilder to disable wsdl caching

This commit is contained in:
Christian Kerl 2011-09-29 13:32:01 +02:00
parent b8beb549f5
commit 642c50c051
1 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,7 @@ class SoapServerBuilder
$builder $builder
->withSoapVersion12() ->withSoapVersion12()
->withEncoding('UTF-8') ->withEncoding('UTF-8')
->withNoWsdlCache()
->withErrorReporting(false) ->withErrorReporting(false)
->withSingleElementArrays() ->withSingleElementArrays()
; ;
@ -49,7 +50,7 @@ class SoapServerBuilder
private $optionHandlerObject = null; 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() private function __construct()
{ {
@ -159,6 +160,13 @@ class SoapServerBuilder
return $this; return $this;
} }
public function withNoWsdlCache()
{
$this->options['cache_wsdl'] = Cache::TYPE_NONE;
return $this;
}
public function withWsdlDiskCache() public function withWsdlDiskCache()
{ {
$this->options['cache_wsdl'] = Cache::TYPE_DISK; $this->options['cache_wsdl'] = Cache::TYPE_DISK;