Since: 8.0

final class Attribute (View source)

Constants

TARGET_CLASS

Marks that attribute declaration is allowed only in classes.

TARGET_FUNCTION

Marks that attribute declaration is allowed only in functions.

TARGET_METHOD

Marks that attribute declaration is allowed only in class methods.

TARGET_PROPERTY

Marks that attribute declaration is allowed only in class properties.

TARGET_CLASS_CONSTANT

Marks that attribute declaration is allowed only in class constants.

TARGET_PARAMETER

Marks that attribute declaration is allowed only in function or method parameters.

TARGET_ALL

Marks that attribute declaration is allowed anywhere.

IS_REPEATABLE

Notes that an attribute declaration in the same place is allowed multiple times.

Properties

int $flags

Methods

__construct(int $flags = self::TARGET_ALL)

No description

Details

__construct(int $flags = self::TARGET_ALL)

No description

Parameters

int $flags

A value in the form of a bitmask indicating the places where attributes can be defined.