src/Php/ClassHierarchy.php
public function isA($class, $test_class)
    {
        $test_class = $this->normalize($test_class);
        if ($this->classExists($test_class)) {
            return in_array($test_class, $this->getAncestors($class));
        } elseif ($this->interfaceExists($test_class)) {
            return in_array($test_class, $this->getImplements($class));
        } else {
            throw new ClassNotExistException($test_class);
        }
    }
public function isA($class, $test_class)
    {
        $test_class = $this->normalize($test_class);
        if ($this->classExists($test_class)) {
            return in_array($test_class, $this->getAncestors($class));
        } elseif ($this->interfaceExists($test_class)) {
            return in_array($test_class, $this->getImplements($class));
        } else {
            throw new ClassNotExistException($test_class);
        }
    }
public function isA ( $ class , $ test_class ) { $ test_class = $ this -> normalize ( $ test_class ) ; if ( $ this -> classExists ( $ test_class ) ) { return in_array ( $ test_class , $ this -> getAncestors ( $ class ) ) ; } elseif ( $ this -> interfaceExists ( $ test_class ) ) { return in_array ( $ test_class , $ this -> getImplements ( $ class ) ) ; } else { throw new ClassNotExistException ( $ test_class ) ; } }
checks the class is subclass or implements the test class

@param string $class
@param string $test_class class or interface name
@return boolean
checks the class is subclass or implements the test class