BeSimpleSoap/Resources/doc/tutorial/array.rst

25 lines
620 B
ReStructuredText
Raw Normal View History

2011-08-02 23:27:56 +02:00
Array
=====
Controller
----------
.. code-block:: php
namespace My\App\Controller;
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
{
return $this->container->get('besimple.soap.response')->setReturnValue("Hello ".implode(', ', $names));
2011-08-02 23:27:56 +02:00
}
}