public function isSubclassOf($class)
    {
        return false;  // @FIXME see unit tests

        if (in_array($class, $this->struct['interfaces'])) {
            // checks first if implement a specified interface
            return true;
        }

        $parent = $this->getParentClass();
        if (!empty($parent)) {
            // checks second inheritance

            if ($parent->getName() === $class) {
                // checks class name
                return true;
            }
            // then checks interfaces implemented
            return in_array($class, $parent->getInterfaceNames());
        }
        return false;
    }
public function isSubclassOf($class)
    {
        return false;  // @FIXME see unit tests

        if (in_array($class, $this->struct['interfaces'])) {
            // checks first if implement a specified interface
            return true;
        }

        $parent = $this->getParentClass();
        if (!empty($parent)) {
            // checks second inheritance

            if ($parent->getName() === $class) {
                // checks class name
                return true;
            }
            // then checks interfaces implemented
            return in_array($class, $parent->getInterfaceNames());
        }
        return false;
    }
public function isSubclassOf ( $ class ) { return false ; // @FIXME see unit tests if ( in_array ( $ class , $ this -> struct [ 'interfaces' ] ) ) { // checks first if implement a specified interface return true ; } $ parent = $ this -> getParentClass ( ) ; if ( ! empty ( $ parent ) ) { // checks second inheritance if ( $ parent -> getName ( ) === $ class ) { // checks class name return true ; } // then checks interfaces implemented return in_array ( $ class , $ parent -> getInterfaceNames ( ) ) ; } return false ; }
Checks if the class is a subclass of a specified class
or implements a specified interface.

@param string $class The class name being checked against.

@return bool TRUE if the class is a subclass, FALSE otherwise.
Checks if the class is a subclass of a specified class or implements a specified interface .