Categories
How to get constructor arguments through reflection?
Is it possible to somehow pull out what the class constructor takes?
Answer the question
In order to leave comments, you need to log in
You can get constructor parameters
$construct = new ReflectionMethod('SomeClass', '__construct'); $parameters = $construct->getParameters(); var_dump($parameters);
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question