added return type to Method class
This commit is contained in:
parent
1f8773a433
commit
928dc80b5e
|
@ -64,6 +64,8 @@ class XmlFileLoader extends FileLoader
|
|||
$method->getArguments()->add($this->parseArgument($argument));
|
||||
}
|
||||
|
||||
$method->setReturn($this->parseType($node->return->type));
|
||||
|
||||
return $method;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue