ReflectionClass::implementsInterface

(PHP 5, PHP 7)

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

説明

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

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

パラメータ

interface

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

返り値

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

エラー / 例外

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

参考