File indexing completed on 2025-01-19 05:21:28
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Server 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 */ 0020 0021 /** 0022 * Return value reflection 0023 * 0024 * Stores the return value type and description 0025 * 0026 * @category Zend 0027 * @package Zend_Server 0028 * @subpackage Reflection 0029 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0030 * @license http://framework.zend.com/license/new-bsd New BSD License 0031 * @version $Id$ 0032 */ 0033 class Zend_Server_Reflection_ReturnValue 0034 { 0035 /** 0036 * Return value type 0037 * @var string 0038 */ 0039 protected $_type; 0040 0041 /** 0042 * Return value description 0043 * @var string 0044 */ 0045 protected $_description; 0046 0047 /** 0048 * Constructor 0049 * 0050 * @param string $type Return value type 0051 * @param string $description Return value type 0052 */ 0053 public function __construct($type = 'mixed', $description = '') 0054 { 0055 $this->setType($type); 0056 $this->setDescription($description); 0057 } 0058 0059 /** 0060 * Retrieve parameter type 0061 * 0062 * @return string 0063 */ 0064 public function getType() 0065 { 0066 return $this->_type; 0067 } 0068 0069 /** 0070 * Set parameter type 0071 * 0072 * @param string|null $type 0073 * @return void 0074 */ 0075 public function setType($type) 0076 { 0077 if (!is_string($type) && (null !== $type)) { 0078 // require_once 'Zend/Server/Reflection/Exception.php'; 0079 throw new Zend_Server_Reflection_Exception('Invalid parameter type'); 0080 } 0081 0082 $this->_type = $type; 0083 } 0084 0085 /** 0086 * Retrieve parameter description 0087 * 0088 * @return string 0089 */ 0090 public function getDescription() 0091 { 0092 return $this->_description; 0093 } 0094 0095 /** 0096 * Set parameter description 0097 * 0098 * @param string|null $description 0099 * @return void 0100 */ 0101 public function setDescription($description) 0102 { 0103 if (!is_string($description) && (null !== $description)) { 0104 // require_once 'Zend/Server/Reflection/Exception.php'; 0105 throw new Zend_Server_Reflection_Exception('Invalid parameter description'); 0106 } 0107 0108 $this->_description = $description; 0109 } 0110 }