ReflectionClass::implementsInterface

Implements interface

Description

public bool ReflectionClass::implementsInterface(ReflectionClassstring $interface)

Checks whether it implements an interface.

Parameters

interface

The interface name.

Return Values

Returns true on success or false on failure.

Errors/Exceptions

ReflectionClass::implementsInterface throws an ReflectionException if interface is not an interface.

See Also

  • ReflectionClass::isInterface
  • ReflectionClass::isSubclassOf
  • interface_exists
  • Object Interfaces