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" }
}
ReflectionClass::getMethods
(PHP 5)
ReflectionClass::getMethods — Gets a list of methods
Description
public array ReflectionClass::getMethods
([ string $filter
] )
Gets a list of methods.
Warning
This function is currently not documented; only its argument list is available.
Parameters
- filter
-
Any combination of ReflectionMethod::IS_STATIC, ReflectionMethod::IS_PUBLIC, ReflectionMethod::IS_PROTECTED, ReflectionMethod::IS_PRIVATE, ReflectionMethod::IS_ABSTRACT, ReflectionMethod::IS_FINAL.
Return Values
An array of methods.
ReflectionClass::getMethods
calibhaan at gmail dot com
11-May-2010 06:57
11-May-2010 06:57
