Re: [PHP-WIN] Determining an external function/method's argument/parameter listing..?

2012-06-12 Thread Jacob Kruger
Ok, thanks for that referral. The following code shows a bit of a simple usage of the reflectionMethod class, on a quickly generated test class and one of it's methods: getParameters(); echo "\n"; foreach ($params as $param) { echo "\n"; echo "parameter: " . $param->getName() . "\n"; echo "all

RE: [PHP-WIN] Determining an external function/method's argument/parameter listing..?

2012-06-12 Thread Toby Hart Dyke
You need to take a look at reflection in the PHP manual (http://www.php.net/manual/en/book.reflection.php). From the introduction: "PHP 5 comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions, methods and extensions. Additionally, the reflec

[PHP-WIN] Determining an external function/method's argument/parameter listing..?

2012-06-12 Thread Jacob Kruger
If I managed to determine that a ffunction/method exists for an external class, by finding it in the array returned by the get_class_methods('className') function, but, then how would I determine the required/possible parameters for one of those functions/methods..? Inside a function itself you