ReflectionClass::implementsInterface
PHP Manual
PHP Manual»ReflectionClass»ReflectionClass::implementsInterface

ReflectionClass::implementsInterface

(PHP 5, PHP 7, PHP 8)

ReflectionClass::implementsInterfaceImplements interface

Опис

public function 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.

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

To Top