|
@@ 154-169 (lines=16) @@
|
| 151 |
|
* @param string $index |
| 152 |
|
* @return string|null |
| 153 |
|
*/ |
| 154 |
|
public function getParameterClassName(ReflectionParameter $param, $class_name, $index) |
| 155 |
|
{ |
| 156 |
|
if (isset($this->parameter_classes[ $class_name ][ $index ]['param_class_name'])) { |
| 157 |
|
return $this->parameter_classes[ $class_name ][ $index ]['param_class_name']; |
| 158 |
|
} |
| 159 |
|
if (! isset($this->parameter_classes[ $class_name ])) { |
| 160 |
|
$this->parameter_classes[ $class_name ] = array(); |
| 161 |
|
} |
| 162 |
|
if (! isset($this->parameter_classes[ $class_name ][ $index ])) { |
| 163 |
|
$this->parameter_classes[ $class_name ][ $index ] = array(); |
| 164 |
|
} |
| 165 |
|
$this->parameter_classes[ $class_name ][ $index ]['param_class_name'] = $param->getClass() |
| 166 |
|
? $param->getClass()->name |
| 167 |
|
: null; |
| 168 |
|
return $this->parameter_classes[ $class_name ][ $index ]['param_class_name']; |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
|
| 172 |
|
/** |
|
@@ 178-193 (lines=16) @@
|
| 175 |
|
* @param string $index |
| 176 |
|
* @return string|null |
| 177 |
|
*/ |
| 178 |
|
public function getParameterDefaultValue(ReflectionParameter $param, $class_name, $index) |
| 179 |
|
{ |
| 180 |
|
if (isset($this->parameter_classes[ $class_name ][ $index ]['param_class_default'])) { |
| 181 |
|
return $this->parameter_classes[ $class_name ][ $index ]['param_class_default']; |
| 182 |
|
} |
| 183 |
|
if (! isset($this->parameter_classes[ $class_name ])) { |
| 184 |
|
$this->parameter_classes[ $class_name ] = array(); |
| 185 |
|
} |
| 186 |
|
if (! isset($this->parameter_classes[ $class_name ][ $index ])) { |
| 187 |
|
$this->parameter_classes[ $class_name ][ $index ] = array(); |
| 188 |
|
} |
| 189 |
|
$this->parameter_classes[ $class_name ][ $index ]['param_class_default'] = $param->isDefaultValueAvailable() |
| 190 |
|
? $param->getDefaultValue() |
| 191 |
|
: null; |
| 192 |
|
return $this->parameter_classes[ $class_name ][ $index ]['param_class_default']; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
|
| 196 |
|
/** |