2010-10-07 15:16:56 +02:00
|
|
|
<?php
|
2010-10-08 17:01:27 +02:00
|
|
|
/*
|
2011-07-18 22:43:12 +02:00
|
|
|
* This file is part of the BeSimpleSoapBundle.
|
2010-10-08 17:01:27 +02:00
|
|
|
*
|
|
|
|
* (c) Christian Kerl <christian-kerl@web.de>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
2010-10-07 15:16:56 +02:00
|
|
|
|
2011-07-18 22:43:12 +02:00
|
|
|
namespace BeSimple\SoapBundle\ServiceDefinition;
|
2010-10-07 15:16:56 +02:00
|
|
|
|
2011-07-18 22:43:12 +02:00
|
|
|
use BeSimple\SoapBundle\Util\Collection;
|
2010-10-08 14:24:42 +02:00
|
|
|
|
|
|
|
class Method
|
2010-10-07 15:16:56 +02:00
|
|
|
{
|
|
|
|
private $name;
|
|
|
|
private $controller;
|
2010-10-08 14:24:42 +02:00
|
|
|
private $arguments;
|
2011-08-14 18:00:28 +02:00
|
|
|
private $headers;
|
2011-01-07 23:00:17 +01:00
|
|
|
private $return;
|
2010-10-07 15:16:56 +02:00
|
|
|
|
2011-08-14 18:00:28 +02:00
|
|
|
public function __construct($name = null, $controller = null, array $headers = array(), array $arguments = array(), Type $return = null)
|
2010-10-07 15:16:56 +02:00
|
|
|
{
|
|
|
|
$this->setName($name);
|
|
|
|
$this->setController($controller);
|
2011-08-14 18:00:28 +02:00
|
|
|
$this->setHeaders($headers);
|
2010-10-08 14:24:42 +02:00
|
|
|
$this->setArguments($arguments);
|
2011-07-17 10:46:54 +02:00
|
|
|
|
|
|
|
if ($return) {
|
|
|
|
$this->setReturn($return);
|
|
|
|
}
|
2010-10-07 15:16:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setName($name)
|
|
|
|
{
|
|
|
|
$this->name = $name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getController()
|
|
|
|
{
|
|
|
|
return $this->controller;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setController($controller)
|
|
|
|
{
|
|
|
|
$this->controller = $controller;
|
|
|
|
}
|
2010-10-08 14:24:42 +02:00
|
|
|
|
2011-08-14 18:00:28 +02:00
|
|
|
public function getHeaders()
|
|
|
|
{
|
|
|
|
return $this->headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setHeaders(array $headers)
|
|
|
|
{
|
|
|
|
$this->headers = new Collection('getName', 'BeSimple\SoapBundle\ServiceDefinition\Header');
|
|
|
|
$this->headers->addAll($headers);
|
|
|
|
}
|
|
|
|
|
2010-10-08 14:24:42 +02:00
|
|
|
public function getArguments()
|
|
|
|
{
|
|
|
|
return $this->arguments;
|
|
|
|
}
|
|
|
|
|
2011-07-17 10:46:54 +02:00
|
|
|
public function setArguments(array $arguments)
|
2010-10-08 14:24:42 +02:00
|
|
|
{
|
2011-07-18 22:43:12 +02:00
|
|
|
$this->arguments = new Collection('getName', 'BeSimple\SoapBundle\ServiceDefinition\Argument');
|
2010-10-08 14:24:42 +02:00
|
|
|
$this->arguments->addAll($arguments);
|
|
|
|
}
|
2011-01-07 23:00:17 +01:00
|
|
|
|
|
|
|
public function getReturn()
|
|
|
|
{
|
|
|
|
return $this->return;
|
|
|
|
}
|
|
|
|
|
2011-07-17 10:46:54 +02:00
|
|
|
public function setReturn(Type $return)
|
2011-01-07 23:00:17 +01:00
|
|
|
{
|
|
|
|
$this->return = $return;
|
|
|
|
}
|
2010-10-07 15:16:56 +02:00
|
|
|
}
|