1 | <?php |
||
31 | class PhpParameter extends AbstractModel { |
||
32 | |||
33 | use NamePart; |
||
34 | use TypePart; |
||
35 | use ValuePart; |
||
36 | |||
37 | private $passedByReference = false; |
||
38 | |||
39 | /** |
||
40 | * Creates a new PHP parameter. |
||
41 | * |
||
42 | * @param string $name the parameter name |
||
43 | * @return static |
||
44 | */ |
||
45 | 16 | public static function create($name = null) { |
|
48 | |||
49 | /** |
||
50 | * Creates a PHP parameter from reflection |
||
51 | * |
||
52 | * @param \ReflectionParameter $ref |
||
53 | * @return PhpParameter |
||
54 | */ |
||
55 | 4 | public static function fromReflection(\ReflectionParameter $ref) { |
|
93 | |||
94 | 26 | /** |
|
95 | 26 | * Creates a new PHP parameter |
|
96 | 26 | * |
|
97 | * @param string $name the parameter name |
||
98 | */ |
||
99 | public function __construct($name = null) { |
||
102 | |||
103 | /** |
||
104 | 5 | * Sets whether this parameter is passed by reference |
|
105 | 5 | * |
|
106 | * @param bool $bool `true` if passed by reference and `false` if not |
||
107 | 5 | * @return $this |
|
108 | */ |
||
109 | public function setPassedByReference($bool) { |
||
114 | |||
115 | 12 | /** |
|
116 | 12 | * Returns whether this parameter is passed by reference |
|
117 | * |
||
118 | * @return bool `true` if passed by reference and `false` if not |
||
119 | */ |
||
120 | public function isPassedByReference() { |
||
123 | |||
124 | 7 | /** |
|
125 | 7 | * Returns a docblock tag for this parameter |
|
126 | 7 | * |
|
127 | 7 | * @return ParamTag |
|
128 | 7 | */ |
|
129 | public function getDocblockTag() { |
||
135 | |||
136 | /** |
||
137 | * Alias for setDescription() |
||
138 | 7 | * |
|
139 | 7 | * @see #setDescription |
|
140 | * @param string $description |
||
141 | * @return $this |
||
142 | */ |
||
143 | public function setTypeDescription($description) { |
||
146 | |||
147 | /** |
||
148 | 8 | * Alias for getDescription() |
|
149 | 8 | * |
|
150 | * @see #getDescription |
||
151 | * @return string |
||
152 | */ |
||
153 | public function getTypeDescription() { |
||
156 | } |
||
157 |