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
- Interfaces' methods has been well declared as public
5
+
- Minor readme typo updates
6
+
7
+
## 1.0.0
6
8
- First major release, code coverage improved to reach 100% from the 1.0.0RC02 release.
7
9
8
-
1.0.0RC02
9
-
---------
10
+
## 1.0.0RC02
10
11
- Major: update source code structure, put all classes under ```src``` folder, rename Tests to tests, update composer and phpunit accordingly
11
12
12
-
1.0.0RC01
13
-
---------
13
+
## 1.0.0RC01
14
14
- Update Readme
15
15
- Define interfaces that must be used as interfaces in order to be able to define a usable top class for any generated ServiceType/StructType/ArrayType class by the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator)
This project contains base classes used as parent class by the generated classes from [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator):
@@ -31,7 +32,7 @@ There is at least/most one method that must be implemented so it's pretty fast t
31
32
32
33
### StructArrayInterface
33
34
#### Description
34
-
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
35
+
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
35
36
36
37
#### What has to be implemented?
37
38
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.
@@ -85,10 +86,10 @@ Here are the methods that must be implemented and why:
85
86
86
87
**If you do not want to implement all these methods, you can too create your own class that inherits from our [AbstractSoapClientBase](#abstractsoapclientbase) class.**
87
88
88
-
## How tos
89
+
## The abstract classes
89
90
### AbstractStructBase
90
91
#### Description
91
-
This class is the base class for any ```StructType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator). It implements our [StructInteface](#structinteface) interface.
92
+
This class is the base class for any ```StructType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator). It implements our [StructInterface](#structinterface) interface.
92
93
It defines three methods:
93
94
-**__set_state($array)**: Useful when you load the string representation of an object that you stored using ```var_export```. It also allows you to ease the instanciation of an object that contains many properties which would be hard to instanciate using the ```__construct``` method. You can see ```__set_state``` as an hydratation method.
94
95
-**_set($name, $value)**: As magic method ```__set``` but used by the ```__set_state``` method. Plus, defining ```__set``` method on used class by the classmap option for the [SoapClient](http://php.net/manual/en/class.soapclient.php) breaks the correct hydratation of your received objects.
This class is the base class for any ```ArrayType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator). It implements our [StructArrayInteface](#structarrayinterface) interface.
111
+
This class is the base class for any ```ArrayType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator). It implements our [StructArrayInterface](#structarrayinterface) interface.
111
112
112
113
#### Usage
113
114
As soon as you have an element that is an array of items such as:
@@ -205,7 +206,7 @@ It's basically a decorator design pattern as the class has the [SoapClient](http
205
206
Let's say you have this type of generate ```ServiceType``` class:
206
207
```php
207
208
namespace Api\ServiceType;
208
-
use \WsdlToPhp\PackageBase\AbstractSoapClientBase
209
+
use \WsdlToPhp\PackageBase\AbstractSoapClientBase;
209
210
class ApiUpdate extends AbstractSoapClientBase
210
211
{
211
212
public function UpdateBulkOrder(\Api\StructType\ApiUpdateBulkOrder $parameters)
@@ -275,4 +276,4 @@ You can run the unit tests with the following command:
0 commit comments