« ReflectionClass::hasProperty
ReflectionClass::initializeLazyObject »

ReflectionClass::implementsInterface

(PHP 5, PHP 7, PHP 8)

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

説明

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

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

パラメータ

interface

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

戻り値

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

エラー / 例外

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

参考

関連キーワード:
ReflectionClass   インターフェイス   実装   implementsInterface   interface   hasProperty   initializeLazyObject   成功   ReflectionException   参考   isInterface   isSubclassOf   サブクラス   exists   宣言   確認
関連する関数・ページ:
reflectionclass.issubclassof   reflectionclass.getinterfaces   reflectionclass.isinterface   reflectionclass.getinterfacenames   reflectionclass.getparentclass   reflectionclass.isuserdefined