ReflectionClass::implementsInterface

(PHP 5, PHP 7, PHP 8)

ReflectionClass::implementsInterfaceImplements interface

Опис

public ReflectionClass::implementsInterface(ReflectionClass|string $interface): bool

Checks whether it implements an interface.

Параметри

interface

The interface name.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Помилки/виключення

ReflectionClass::implementsInterface() throws an ReflectionException if interface is not an interface.

Прогляньте також