| 1 | <?php |
||
| 8 | class TypeParameter |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Parameter name. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $name; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Parameter value. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $value; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Parameter comment. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $comment; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Constructor. |
||
| 33 | * |
||
| 34 | * @param string $name Parameter name. |
||
| 35 | * @param string $value Parameter value. |
||
| 36 | * @param string $comment Comment for this parameter. |
||
| 37 | */ |
||
| 38 | 26 | public function __construct($name, $value, $comment = null) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Gets the parameter name. |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | 23 | public function getName() |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Gets the parameter value. |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | 23 | public function getValue() |
|
| 64 | |||
| 65 | /** |
||
| 66 | * Does this parameter have a comment? |
||
| 67 | * |
||
| 68 | * @return boolean true if param has a comment, false otherwise. |
||
| 69 | */ |
||
| 70 | 2 | public function hasComment() |
|
| 74 | |||
| 75 | /** |
||
| 76 | * Gets the parameter comment. |
||
| 77 | * |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | 22 | public function getComment() |
|
| 84 | |||
| 85 | /** |
||
| 86 | * Gets a string representation of this parameter. |
||
| 87 | * |
||
| 88 | * @return string String representation of parameter. |
||
| 89 | */ |
||
| 90 | 23 | public function toString() |
|
| 98 | } |
||
| 99 |