diff --git a/ServiceDefinition/Loader/XmlFileLoader.php b/ServiceDefinition/Loader/XmlFileLoader.php index 0c9d354..1fab1aa 100644 --- a/ServiceDefinition/Loader/XmlFileLoader.php +++ b/ServiceDefinition/Loader/XmlFileLoader.php @@ -64,6 +64,8 @@ class XmlFileLoader extends FileLoader $method->getArguments()->add($this->parseArgument($argument)); } + $method->setReturn($this->parseType($node->return->type)); + return $method; } diff --git a/ServiceDefinition/Method.php b/ServiceDefinition/Method.php index 9f2fb9a..136f9a4 100644 --- a/ServiceDefinition/Method.php +++ b/ServiceDefinition/Method.php @@ -17,12 +17,14 @@ class Method private $name; private $controller; private $arguments; + private $return; - public function __construct($name = null, $controller = null, array $arguments = array()) + public function __construct($name = null, $controller = null, array $arguments = array(), $return = null) { $this->setName($name); $this->setController($controller); $this->setArguments($arguments); + $this->setReturn($return); } public function getName() @@ -55,4 +57,14 @@ class Method $this->arguments = new Collection('getName'); $this->arguments->addAll($arguments); } + + public function getReturn() + { + return $this->return; + } + + public function setReturn($return) + { + $this->return = $return; + } } \ No newline at end of file