Reflection ReflectionClass::implementsInterface
(PHP 5, PHP 7, PHP 8)
ReflectionClass::implementsInterface — 인터페이스 구현
설명
public ReflectionClass::implementsInterface(ReflectionClass|string $interface
): bool
인터페이스를 구현하는지 확인합니다.
매개변수
interface
- 인터페이스 이름입니다.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
오류/예외
ReflectionClass::implementsInterface()는 interface
가 인터페이스가 아닌 경우 ReflectionException을 발생시킵니다.
기타
- ReflectionClass::isInterface() - 클래스가 인터페이스인지 확인
- ReflectionClass::isSubclassOf() - 하위 클래스인지 확인
- interface_exists() - 인터페이스가 정의되었는지 확인
- Object Interfaces