The ReflectionAttribute class
(PHP 8)
Introduction
The ReflectionAttribute class provides information about an Attributes.
Class synopsis
Predefined Constants
ReflectionAttribute Flags
ReflectionAttribute::IS_INSTANCEOF
-
Retrieve attributes using an
instanceof
check.
Note:
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.
Table of Contents
- ReflectionAttribute::__construct — Private constructor to disallow direct instantiation
- ReflectionAttribute::getArguments — Gets arguments passed to attribute
- ReflectionAttribute::getName — Gets attribute name
- ReflectionAttribute::getTarget — Returns the target of the attribute as bitmask
- ReflectionAttribute::isRepeated — Returns whether the attribute of this name could occur repeatedly on a code element
- ReflectionAttribute::newInstance — Instantiates the attribute class represented by this ReflectionAttribute class and arguments