BeSimpleSoap/Resources/doc/soapserver/tutorial/array.rst

26 lines
565 B
ReStructuredText
Raw Normal View History

2011-08-02 23:27:56 +02:00
Array
=====
Controller
----------
.. code-block:: php
2013-02-20 15:58:12 +01:00
namespace Acme\DemoBundle\Controller;
2011-08-02 23:27:56 +02:00
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use Symfony\Component\DependencyInjection\ContainerAware;
class DemoController extends ContainerAware
{
/**
2011-08-14 18:13:12 +02:00
* @Soap\Method("hello")
* @Soap\Param("names", phpType = "string[]")
* @Soap\Result(phpType = "string")
2011-08-02 23:27:56 +02:00
*/
2011-08-14 18:13:12 +02:00
public function helloAction(array $names)
2011-08-02 23:27:56 +02:00
{
2013-02-20 15:58:12 +01:00
return "Hello ".implode(', ', $names);
2011-08-02 23:27:56 +02:00
}
2013-02-20 15:58:12 +01:00
}