src/Utilities/Reflection.php
public static function getParentClassName($class)
    {
        $className = self::getClassName($class);
        $reflection = new \ReflectionClass($className);
        $parentClass = $reflection->getParentClass();

        if (null === $parentClass || false === $parentClass) {
            return null;
        }

        return $parentClass->getName();
    }
public static function getParentClassName($class)
    {
        $className = self::getClassName($class);
        $reflection = new \ReflectionClass($className);
        $parentClass = $reflection->getParentClass();

        if (null === $parentClass || false === $parentClass) {
            return null;
        }

        return $parentClass->getName();
    }
public static function getParentClassName ( $ class ) { $ className = self :: getClassName ( $ class ) ; $ reflection = new \ ReflectionClass ( $ className ) ; $ parentClass = $ reflection -> getParentClass ( ) ; if ( null === $ parentClass || false === $ parentClass ) { return null ; } return $ parentClass -> getName ( ) ; }
Returns name of the parent class.
If given class does not extend another, returns null.

@param array|object|string $class An array of objects, namespaces, object or namespace
@return null|string
Returns name of the parent class . If given class does not extend another returns null .