PHP Class VCR\Util\SoapClient

Inheritance: extends SoapClient
Mostrar archivo Open project: php-vcr/php-vcr Class Usage Examples

Protected Properties

Property Type Description
$options
$request string
$response string
$soapHook SOAP library hook used to intercept SOAP requests.

Public Methods

Method Description
__construct ( $wsdl, $options = [] )
__doRequest ( string $request, string $location, string $action, integer $version, integer $one_way ) : string Performs (and may intercepts) SOAP request over HTTP.
__getLastRequest ( )
__getLastResponse ( )
setLibraryHook ( SoapHook $hook ) Sets the SOAP library hook which is used to intercept SOAP requests.

Protected Methods

Method Description
getLibraryHook ( ) : SoapHook Returns currently used SOAP library hook.
realDoRequest ( string $request, string $location, string $action, integer $version, integer $one_way ) : string Performs a real SOAP request over HTTP.

Method Details

__construct() public method

public __construct ( $wsdl, $options = [] )

__doRequest() public method

Requests will be intercepted if the library hook is enabled.
public __doRequest ( string $request, string $location, string $action, integer $version, integer $one_way ) : string
$request string The XML SOAP request.
$location string The URL to request.
$action string The SOAP action.
$version integer The SOAP version.
$one_way integer If one_way is set to 1, this method returns nothing. Use this where a response is not expected.
return string The XML SOAP response.

__getLastRequest() public method

public __getLastRequest ( )

__getLastResponse() public method

public __getLastResponse ( )

getLibraryHook() protected method

If no library hook is set, a new one is created.
protected getLibraryHook ( ) : SoapHook
return VCR\LibraryHooks\SoapHook SOAP library hook.

realDoRequest() protected method

Performs a real SOAP request over HTTP.
protected realDoRequest ( string $request, string $location, string $action, integer $version, integer $one_way ) : string
$request string The XML SOAP request.
$location string The URL to request.
$action string The SOAP action.
$version integer The SOAP version.
$one_way integer If one_way is set to 1, this method returns nothing. Use this where a response is not expected.
return string The XML SOAP response.

setLibraryHook() public method

Sets the SOAP library hook which is used to intercept SOAP requests.
public setLibraryHook ( SoapHook $hook )
$hook VCR\LibraryHooks\SoapHook SOAP library hook to use when intercepting SOAP requests.

Property Details

$options protected_oe property

protected $options

$request protected_oe property

protected string $request
return string

$response protected_oe property

protected string $response
return string

$soapHook protected_oe property

SOAP library hook used to intercept SOAP requests.
protected $soapHook