BeSimple/BeSimpleSoapBundle — pull request #91 by raziel057 (2014-09-04 15:54:57+00:00)
Title: List of objects

Please view the related PR in BeSimpleSoapBundle, BeSimpleSoapCommon, BeSimpleSoapWsdl

The goal of this PR is to fix the problem described here :
https://github.com/BeSimple/BeSimpleSoap/issues/48

With this PR it's possible to define a collection of object like this:
```php
/**
* @Soap\Alias("ParticipantTypeDetail")
*/
class ParticipantTypeDetail
{
/**
* @var string
* @Soap\ComplexType("string")
*/
private $name;

/**
* @var ParticipantTypeProperty[]
* @Soap\ComplexType("PTC\WsBundle\TO\ParticipantProperty", minOccurs="1", maxOccurs="unbounded")
*/
private $participantList;
```

The related generated WSDL is:
```

```

Sample of response from a WS Call:
```

Supplier

12
Thomas
Lallement
Decostanding
Driver
accredited

22
Jerome
Martin
Decostanding
Fire departement
requested

```

So from the client side we can fetch the results by doing (sample with PHP Classmap)
```php
$participantList = $myObject->getParticipantList();
```

Rather than (current behavior):
```php
$participantList = $myObject->getParticipantList()->item;
```