3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Server\Reflection
;
13 * Return value reflection
15 * Stores the return value type and description
17 class ReflectionReturnValue
26 * Return value description
29 protected $description;
34 * @param string $type Return value type
35 * @param string $description Return value type
37 public function __construct($type = 'mixed', $description = '')
39 $this->setType($type);
40 $this->setDescription($description);
44 * Retrieve parameter type
48 public function getType()
56 * @param string|null $type
57 * @throws Exception\InvalidArgumentException
60 public function setType($type)
62 if (!is_string($type) && (null !== $type)) {
63 throw new Exception\
InvalidArgumentException('Invalid parameter type');
70 * Retrieve parameter description
74 public function getDescription()
76 return $this->description
;
80 * Set parameter description
82 * @param string|null $description
83 * @throws Exception\InvalidArgumentException
86 public function setDescription($description)
88 if (!is_string($description) && (null !== $description)) {
89 throw new Exception\
InvalidArgumentException('Invalid parameter description');
92 $this->description
= $description;