ReflectionClass::implementsInterface
(PHP 5, PHP 7)
ReflectionClass::implementsInterface — インターフェイスの実装を調べる
説明
public ReflectionClass::implementsInterface
( ReflectionClass|string $interface
) : bool
インターフェイスを実装しているかどうかを調べます。
パラメータ
interface
- インターフェイスの名前。
返り値
成功した場合に true
を、失敗した場合に false
を返します。
エラー / 例外
ReflectionClass::implementsInterface() は、
interface
がインターフェイスでない場合に
ReflectionException をスローします。
参考
- ReflectionClass::isInterface() - このクラスがインターフェイスであるかどうかを調べる
- ReflectionClass::isSubclassOf() - サブクラスであるかどうかを調べる
- interface_exists() - インターフェイスが宣言されているかどうかを確認する
- オブジェクト インターフェイス