note 97840 modified in reflectionclass.getmethods by danbrown
| From: | danbrown@php.net | Date: | Tue, 11 May 2010 17:39:47 +0000 |
| Subject: | note 97840 modified in reflectionclass.getmethods by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169149@lists.php.net to get a copy of this message | ||
This method return an array of ReflectionMethod;
For example:
<?php
$reflection = new ReflectionClass('Test');
$aMethods = $reflection->getMethods();
var_dump($aMethods);
?>
Display:
array(2) {
[0]=> &object(ReflectionMethod)#7 (2) {
["name"]=> string(11) "__construct"
["class"]=> string(9) "Test" }
[1]=> &object(ReflectionMethod)#8 (2) {
["name"]=> string(3) "run"
["class"]=> string(9) "Test" }
}
--was--
This method return an array of ReflectionMethod;
For example:
$reflection = new ReflectionClass('Test');
$aMethods = $reflection->getMethods();
var_dump($aMethods);
Display:
array(2) {
[0]=> &object(ReflectionMethod)#7 (2) {
["name"]=> string(11) "__construct"
["class"]=> string(9) "Test" }
[1]=> &object(ReflectionMethod)#8 (2) {
["name"]=> string(3) "run"
["class"]=> string(9) "Test" }
}
http://php.net/manual/en/reflectionclass.getmethods.php