Example #1
0
 public function testSetLifetime()
 {
     Cache::setLifetime(1234);
     $this->assertEquals(1234, Cache::getLifetime());
     Cache::setLifetime(4321);
     $this->assertEquals(4321, Cache::getLifetime());
 }
 /**
  * Constructor.
  *
  * @param \BeSimple\SoapClient\Curl $curl                  Curl instance
  * @param boolean                   $resolveRemoteIncludes WSDL/XSD include enabled?
  * @param boolean                   $cacheWsdl             Cache constant
  */
 public function __construct(Curl $curl, $resolveRemoteIncludes = true, $cacheWsdl = Cache::TYPE_DISK)
 {
     $this->curl = $curl;
     $this->resolveRemoteIncludes = (bool) $resolveRemoteIncludes;
     // get current WSDL caching config
     $this->cacheEnabled = $cacheWsdl === Cache::TYPE_NONE ? Cache::DISABLED : Cache::ENABLED == Cache::isEnabled();
     $this->cacheDir = Cache::getDirectory();
     $this->cacheTtl = Cache::getLifetime();
 }