Usephul

Attributes

Table of Contents

Functions

applies()  : bool
Finds whether an attribute has been applied to a given object, class, interface, or trait.

Functions

applies()

Finds whether an attribute has been applied to a given object, class, interface, or trait.

applies(object|class-string $object_or_class, class-string $attribute) : bool
Parameters
$object_or_class : object|class-string

A class name or an object instance.

$attribute : class-string

The attribute name.

Return values
bool

true if the attribute has been applied to the given object or class. false otherwise.


        
On this page

Search results