# The ReflectionMethod class

(PHP 5, PHP 7)

## Introducere

The ReflectionMethod class reports information about a method.

## Sinopsisul clasei

ReflectionMethod extends ReflectionFunctionAbstract implements Reflector {
/* Constante */
const integer IS_STATIC = 1 ;
const integer IS_PUBLIC = 256 ;
const integer IS_PROTECTED = 512 ;
const integer IS_PRIVATE = 1024 ;
const integer IS_ABSTRACT = 2 ;
const integer IS_FINAL = 4 ;
/* Proprietăți */
public $name ;
public $class ;
/* Metode */
public __construct ( mixed `$class` , string `$name` )
public static export ( string `$class` , string `$name` [, bool `$return` = `FALSE` ] ) : string
public getClosure ( object `$object` ) : Closure
public getDeclaringClass ( void ) : ReflectionClass
public getModifiers ( void ) : int
public getPrototype ( void ) : ReflectionMethod
public invoke ( object `$object` [, mixed `$...` ] ) : mixed
public invokeArgs ( object `$object` , array `$args` ) : mixed
public isAbstract ( void ) : bool
public isConstructor ( void ) : bool
public isDestructor ( void ) : bool
public isFinal ( void ) : bool
public isPrivate ( void ) : bool
public isProtected ( void ) : bool
public isPublic ( void ) : bool
public isStatic ( void ) : bool
public setAccessible ( bool `$accessible` ) : void
public __toString ( void ) : string
/* Metode moștenite */
final private ReflectionFunctionAbstract::__clone ( void ) : void
public ReflectionFunctionAbstract::getClosureScopeClass ( void ) : ReflectionClass
public ReflectionFunctionAbstract::getClosureThis ( void ) : object
public ReflectionFunctionAbstract::getDocComment ( void ) : string
public ReflectionFunctionAbstract::getEndLine ( void ) : int
public ReflectionFunctionAbstract::getExtension ( void ) : ReflectionExtension
public ReflectionFunctionAbstract::getExtensionName ( void ) : string
public ReflectionFunctionAbstract::getFileName ( void ) : string
public ReflectionFunctionAbstract::getName ( void ) : string
public ReflectionFunctionAbstract::getNamespaceName ( void ) : string
public ReflectionFunctionAbstract::getNumberOfParameters ( void ) : int
public ReflectionFunctionAbstract::getNumberOfRequiredParameters ( void ) : int
public ReflectionFunctionAbstract::getParameters ( void ) : array
public ReflectionFunctionAbstract::getReturnType ( void ) : ReflectionType
public ReflectionFunctionAbstract::getShortName ( void ) : string
public ReflectionFunctionAbstract::getStartLine ( void ) : int
public ReflectionFunctionAbstract::getStaticVariables ( void ) : array
public ReflectionFunctionAbstract::hasReturnType ( void ) : bool
public ReflectionFunctionAbstract::inNamespace ( void ) : bool
public ReflectionFunctionAbstract::isClosure ( void ) : bool
public ReflectionFunctionAbstract::isDeprecated ( void ) : bool
public ReflectionFunctionAbstract::isGenerator ( void ) : bool
public ReflectionFunctionAbstract::isInternal ( void ) : bool
public ReflectionFunctionAbstract::isUserDefined ( void ) : bool
public ReflectionFunctionAbstract::isVariadic ( void ) : bool
public ReflectionFunctionAbstract::returnsReference ( void ) : bool
abstract public ReflectionFunctionAbstract::__toString ( void ) : void
}

## Proprietăți

name

  Method name

class

  Class name

## Constante predefinite

## ReflectionMethod Modifiers

`ReflectionMethod::IS_STATIC`

  Indicates that the method is static.

`ReflectionMethod::IS_PUBLIC`

  Indicates that the method is public.

`ReflectionMethod::IS_PROTECTED`

  Indicates that the method is protected.

`ReflectionMethod::IS_PRIVATE`

  Indicates that the method is private.

`ReflectionMethod::IS_ABSTRACT`

  Indicates that the method is abstract.

`ReflectionMethod::IS_FINAL`

  Indicates that the method is final.

## Cuprins

- ReflectionMethod::__construct — Constructs a ReflectionMethod
- ReflectionMethod::export — Export a reflection method
- ReflectionMethod::getClosure — Returns a dynamically created closure for the method
- ReflectionMethod::getDeclaringClass — Gets declaring class for the reflected method
- ReflectionMethod::getModifiers — Gets the method modifiers
- ReflectionMethod::getPrototype — Gets the method prototype (if there is one)
- ReflectionMethod::invoke — Invoke
- ReflectionMethod::invokeArgs — Invoke args
- ReflectionMethod::isAbstract — Checks if method is abstract
- ReflectionMethod::isConstructor — Checks if method is a constructor
- ReflectionMethod::isDestructor — Checks if method is a destructor
- ReflectionMethod::isFinal — Checks if method is final
- ReflectionMethod::isPrivate — Checks if method is private
- ReflectionMethod::isProtected — Checks if method is protected
- ReflectionMethod::isPublic — Checks if method is public
- ReflectionMethod::isStatic — Checks if method is static
- ReflectionMethod::setAccessible — Set method accessibility
- ReflectionMethod::__toString — Returns the string representation of the Reflection method object