The ReflectionAttribute class
The ReflectionAttribute class provides information about an Attribute.
Intro
The ReflectionAttribute class provides information about an Attribute.
Class synopsis
Properties
nameThe name of the attribute.
Predefined Constants
ReflectionAttribute Flags
ReflectionAttribute::IS_INSTANCEOFintRetrieve attributes using an
instanceofcheck. Used as theflagsargument ofReflectionClass::getAttributesand the equivalent methods of the other reflection classes. When set, thenameargument matches attributes whose class is the given class or a subclass of it, or implements the given interface, instead of only matching the exact class name.
The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.
Changelog
| Version | Description |
|---|---|
| 8.4.0 | All class constants are now typed. |
| 8.4.0 | Added ReflectionAttribute::$name. |
Reflectionattribute