You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,10 +34,10 @@ There is at least/most one method that must be implemented so it's pretty fast t
33
34
34
35
### StructArrayInterface
35
36
#### Description
36
-
This interface must be used to define a new ArrayType class. The goal is to provide utility methods around Array Structs defined by the Wsdl in order to ease the handling of its content. Therefore, this interface inherits from our [StructInterface](#structinterface) interface interface plus the native [ArrayAccess](http://php.net/manual/en/class.arrayaccess.php), [Iterator](http://php.net/manual/en/class.iterator.php) and [Countable](http://php.net/manual/en/class.countable.php) PHP interfaces
37
+
This interface must be used to define a new ArrayType class. The goal is to provide utility methods around Array Structs defined by the Wsdl in order to ease the handling of its content. Therefore, this interface inherits from our [StructInterface](#structinterface) interface plus the native [ArrayAccess](http://php.net/manual/en/class.arrayaccess.php), [Iterator](http://php.net/manual/en/class.iterator.php) and [Countable](http://php.net/manual/en/class.countable.php) PHP interfaces
37
38
38
39
#### What has to be implemented?
39
-
The only method that must implement would be **getAttributeName** but be aware that it is implemented in every generated ArrayType class so no need to define it. It's just a reminder of what is available in ArrayType classes.
40
+
The only method that must be implemented would be **getAttributeName** but be aware that it is implemented in every generated ArrayType class so no need to define it. It's just a reminder of what is available in ArrayType classes.
40
41
41
42
So, basically, you MUST at least override the methods declared by the PHP interfaces from which this interface inherits
42
43
@@ -81,7 +82,7 @@ Here are the methods that must be implemented and why:
81
82
-**getSoapClient()**: must return the [SoapClient](http://php.net/manual/en/class.soapclient.php) object that is responsible fo sending the requests.
82
83
-**setSoapHeader($nameSpace, $name, $data, $mustUnderstand = false, $actor = null)**: look to [AbstractSoapClientBase](#abstractsoapclientbase) part that details this method. Basically, it allows to define [SoapHeader](http://php.net/manual/en/class.soapheader.php)s for the request
83
84
-**getLastError()**: must return the last error, its format is up to you
84
-
-**saveLastError($methoName, \SoapFault $soapFault)**: look to [AbstractSoapClientBase](#abstractsoapclientbase) part that details this method. Basically, it must allow to store a catched [Soapfault](http://php.net/manual/en/class.soapfault.php) object when a request has failed
85
+
-**saveLastError($methodName, \SoapFault $soapFault)**: look to [AbstractSoapClientBase](#abstractsoapclientbase) part that details this method. Basically, it must allow to store a catched [Soapfault](http://php.net/manual/en/class.soapfault.php) object when a request has failed
85
86
-**getResult()**: should return the Soap Web Service response, it's up to you
86
87
-**setResult($result)**: must accept any parameter type as it should received the Soap Web Service response
This class is the base class for any ```ServiceType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator).
203
204
Its goal is to provide utility/handful methods by implementing our [SoapClientInterface](#soapclientinterface) interface.
204
-
It's basically a decorator design pattern as the class has the [SoapClient](http://php.net/manual/en/class.soapclient.php) object as a static property in order to be able apply methods on it. It is static property in order to have a singleton between multiple calls. It can be reset by passing true as the second parameter.
205
+
It's basically a decorator design pattern as the class has the [SoapClient](http://php.net/manual/en/class.soapclient.php) object as a static property in order to be able to apply methods on it. It is a static property in order to have a singleton between multiple calls (allowing to send cookies automatically between calls). It can be reset by passing true as the second parameter.
205
206
206
207
#### Usage
207
208
Let's say you have this type of generate ```ServiceType``` class:
@@ -241,7 +242,7 @@ Then call any of these base methods:
241
242
-**getLastRequestHeaders($asArray = false)**: returns either the HTTP request's headers as a string or as an array (each HTTP header is parsed)
242
243
-**getLastResponseHeaders($asArray = false)**: returns either the HTTP response's headers as a string or as an array
243
244
-**getLastError**: automatically populated with an error when ```$this->saveLastError(__METHOD__, $soapFault)``` is called
244
-
-**getLastErrorForMethod($methoName)** : returns the error associated to the called method. It should return a ```SoapFault``` object
245
+
-**getLastErrorForMethod($methodName)** : returns the error associated to the called method. It should return a ```SoapFault``` object
0 commit comments