La classe ReflectionClass

(PHP 5, PHP 7)

Introduction

La classe ReflectionClass rapporte des informations sur une classe.

Synopsis de la classe

ReflectionClass implements Reflector {
/* Constantes */
const integer IS_IMPLICIT_ABSTRACT = 16 ;
const integer IS_EXPLICIT_ABSTRACT = 32 ;
const integer IS_FINAL = 64 ;
/* Propriétés */
public $name ;
/* Méthodes */
public __construct ( mixed $argument )
public static export ( mixed $argument [, bool $return = FALSE ] ) : string
public getConstant ( string $name ) : mixed
public getConstants ( void ) : array
public getConstructor ( void ) : ReflectionMethod
public getDefaultProperties ( void ) : array
public getDocComment ( void ) : string
public getEndLine ( void ) : int
public getExtensionName ( void ) : string
public getFileName ( void ) : string
public getInterfaceNames ( void ) : array
public getInterfaces ( void ) : array
public getMethod ( string $name ) : ReflectionMethod
public getMethods ([ int $filter ] ) : array
public getModifiers ( void ) : int
public getName ( void ) : string
public getNamespaceName ( void ) : string
public getParentClass ( void ) : ReflectionClass
public getProperties ([ int $filter ] ) : array
public getProperty ( string $name ) : ReflectionProperty
public getReflectionConstants ( void ) : array
public getShortName ( void ) : string
public getStartLine ( void ) : int
public getStaticProperties ( void ) : array
public getStaticPropertyValue ( string $name [, mixed &$def_value ] ) : mixed
public getTraitAliases ( void ) : array
public getTraitNames ( void ) : array
public getTraits ( void ) : array
public hasConstant ( string $name ) : bool
public hasMethod ( string $name ) : bool
public hasProperty ( string $name ) : bool
public implementsInterface ( string $interface ) : bool
public inNamespace ( void ) : bool
public isAbstract ( void ) : bool
public isAnonymous ( void ) : bool
public isCloneable ( void ) : bool
public isFinal ( void ) : bool
public isInstance ( object $object ) : bool
public isInstantiable ( void ) : bool
public isInterface ( void ) : bool
public isInternal ( void ) : bool
public isIterable ( void ) : bool
public isSubclassOf ( mixed $class ) : bool
public isTrait ( void ) : bool
public isUserDefined ( void ) : bool
public newInstance ([ mixed $... ] ) : object
public newInstanceArgs ([ array $args ] ) : object
public newInstanceWithoutConstructor ( void ) : object
public setStaticPropertyValue ( string $name , mixed $value ) : void
public __toString ( void ) : string
}

Propriétés

name

Nom de la classe. En lecture seule, émets ReflectionException lors d'une tentative d'écriture.

Constantes pré-définies

Modificateurs de ReflectionClass

ReflectionClass::IS_IMPLICIT_ABSTRACT

Indique si la classe est abstraite en raison du fait qu'elle contient quelques méthodes abstraites.

ReflectionClass::IS_EXPLICIT_ABSTRACT

Indique si la classe est abstraite en raison de sa définition.

ReflectionClass::IS_FINAL

Indique si la classe est finale.

Sommaire