La classe ReflectionMethod

(PHP 5, PHP 7)

Introduction

La classe ReflectionMethod rapporte des informations sur une méthode.

Synopsis de la classe

ReflectionMethod extends ReflectionFunctionAbstract implements Reflector {
/* Constantes */
const int IS_STATIC = 1 ;
const int IS_PUBLIC = 256 ;
const int IS_PROTECTED = 512 ;
const int IS_PRIVATE = 1024 ;
const int IS_ABSTRACT = 2 ;
const int IS_FINAL = 4 ;
/* Propriétés */
public $name ;
public $class ;
/* Méthodes */
public __construct ( object|string $objectOrMethod , string $method )
public __construct ( string $classMethod )
public static export ( string $class , string $name , bool $return = false ) : string
public getClosure ( object|null $object = null ) : Closure
public getModifiers ( ) : int
public invoke ( object|null $object , mixed ...$args ) : mixed
public invokeArgs ( object|null $object , array $args ) : mixed
public isAbstract ( ) : bool
public isConstructor ( ) : bool
public isDestructor ( ) : bool
public isFinal ( ) : bool
public isPrivate ( ) : bool
public isProtected ( ) : bool
public isPublic ( ) : bool
public isStatic ( ) : bool
public setAccessible ( bool $accessible ) : void
public __toString ( ) : string
/* Méthodes héritées */
final private ReflectionFunctionAbstract::__clone ( ) : void
public ReflectionFunctionAbstract::getFileName ( ) : string|false
abstract public ReflectionFunctionAbstract::__toString ( ) : void
}

Propriétés

name

Nom de la méthode

class

Nom de la classe

Constantes pré-définies

Modificateurs de ReflectionMethod

ReflectionMethod::IS_STATIC

Indique que la méthode est statique

ReflectionMethod::IS_PUBLIC

Indique que la méthode est publique

ReflectionMethod::IS_PROTECTED

Indique que la méthode est protégée

ReflectionMethod::IS_PRIVATE

Indique que la méthode est privée

ReflectionMethod::IS_ABSTRACT

Indique que la méthode est abstraite

ReflectionMethod::IS_FINAL

Indique que la méthode est finale

Sommaire