(PHP 5, PHP 7)
Gets a ReflectionMethod for a class method.
public ReflectionMethod ReflectionClass::getMethod ( string $name )
Gets a ReflectionMethod for a class method.
Parameters:
name
The method name to reflect.
Returns:
Exception:
A ReflectionException if the method does not exist.
Examples:
Basic usage of ReflectionClass::getMethod()
1 2 3 4 5 | <?php $class = new ReflectionClass( 'ReflectionClass' ); $method = $class ->getMethod( 'getMethod' ); var_dump( $method ); ?> |
The above example will output:
object(ReflectionMethod)#2 (2) { ["name"]=> string(9) "getMethod" ["class"]=> string(15) "ReflectionClass" }
See also:
Please login to continue.