ReflectionClass::implementsInterface

(PHP 5, PHP 7, PHP 8)

ReflectionClass::implementsInterfaceインターフェイスの実装を調べる

説明

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

インターフェイスを実装しているかどうかを調べます。

パラメータ

interface

インターフェイスの名前。

戻り値

成功した場合に true を、失敗した場合に false を返します。

エラー / 例外

ReflectionClass::implementsInterface() は、 interface がインターフェイスでない場合に ReflectionException をスローします。

参考

To Top