Fix notice: attribute soapClientOptions defined in Trait and Client class

This commit is contained in:
Petr Bechyně 2017-06-05 10:50:53 +02:00
parent d495f22413
commit b9e36b4900
2 changed files with 22 additions and 3 deletions

View File

@ -123,6 +123,16 @@ class SoapClient extends \SoapClient
return $this->performHttpSoapRequest($soapRequest);
}
protected function getSoapClientOptions()
{
return $this->soapClientOptions;
}
protected function getSoapOptions()
{
return $this->soapOptions;
}
/**
* @param string $location Location
* @param string $action SOAP action

View File

@ -4,12 +4,11 @@ namespace BeSimple\SoapClient;
use BeSimple\SoapBundle\Soap\SoapAttachment;
use BeSimple\SoapClient\SoapOptions\SoapClientOptions;
use BeSimple\SoapCommon\SoapOptions\SoapOptions;
use Exception;
trait SoapClientNativeMethodsTrait
{
/** @var SoapClientOptions */
protected $soapClientOptions;
/** @var SoapAttachment[] */
private $soapAttachmentsOnRequestStorage;
/** @var SoapResponse */
@ -36,6 +35,16 @@ trait SoapClientNativeMethodsTrait
*/
abstract protected function performSoapRequest($request, $location, $action, $version, array $soapAttachments = []);
/**
* @return SoapClientOptions
*/
abstract protected function getSoapClientOptions();
/**
* @return SoapOptions
*/
abstract protected function getSoapOptions();
/**
* Avoid using __call directly, it's deprecated even in \SoapClient.
*
@ -130,7 +139,7 @@ trait SoapClientNativeMethodsTrait
private function checkTracing()
{
if ($this->soapClientOptions->getTrace() === false) {
if ($this->getSoapClientOptions()->getTrace() === false) {
throw new Exception('SoapClientOptions tracing disabled, turn on trace attribute');
}
}