Added headers in request

You can add @Soap\Header("foobar", phpType="string") in a method definition
This commit is contained in:
Francis Besset
2011-08-14 18:00:28 +02:00
parent a6f8ccbfd2
commit c5902122bb
14 changed files with 256 additions and 112 deletions

View File

@ -17,12 +17,14 @@ class Method
private $name;
private $controller;
private $arguments;
private $headers;
private $return;
public function __construct($name = null, $controller = null, array $arguments = array(), Type $return = null)
public function __construct($name = null, $controller = null, array $headers = array(), array $arguments = array(), Type $return = null)
{
$this->setName($name);
$this->setController($controller);
$this->setHeaders($headers);
$this->setArguments($arguments);
if ($return) {
@ -50,6 +52,17 @@ class Method
$this->controller = $controller;
}
public function getHeaders()
{
return $this->headers;
}
public function setHeaders(array $headers)
{
$this->headers = new Collection('getName', 'BeSimple\SoapBundle\ServiceDefinition\Header');
$this->headers->addAll($headers);
}
public function getArguments()
{
return $this->arguments;