BeSimpleSoap/Resources/doc/tutorial/array.rst
2011-08-14 18:13:12 +02:00

26 lines
620 B
ReStructuredText

Array
=====
Controller
----------
.. code-block:: php
namespace My\App\Controller;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapBundle\Soap\SoapResponse;
use Symfony\Component\DependencyInjection\ContainerAware;
class DemoController extends ContainerAware
{
/**
* @Soap\Method("hello")
* @Soap\Param("names", phpType = "string[]")
* @Soap\Result(phpType = "string")
*/
public function helloAction(array $names)
{
return new SoapResponse("Hello ".implode(', ', $names));
}
}