I have
foreach ($constructor_param_names as $reflectionParameter ){
$constructor_params[] = $reflectionParameter -> getName();
$property = $reflectionParameter -> getName();
//how to call the get____ method of the object
//to get the param value (of that parameter name)
$value = $reflectionParameter-> ...
}
This is explained in the documentation for variable methods.
For an instance method:
There are also other ways to call the getter (e.g.
call_user_funcandReflectionMethod::invoke) but this is the most straightforward.Also note that function and method names in PHP are case-insensitive, so there is no need to pay attention to capitalization.