private static function getOrderedClasses(array $classes)
    {
        $map = array();
        self::$seen = array();
        foreach ($classes as $class) {
            try {
                $reflectionClass = new \ReflectionClass($class);
            } catch (\ReflectionException $e) {
                throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class));
            }

            $map = array_merge($map, self::getClassHierarchy($reflectionClass));
        }

        return $map;
    }
private static function getOrderedClasses(array $classes)
    {
        $map = array();
        self::$seen = array();
        foreach ($classes as $class) {
            try {
                $reflectionClass = new \ReflectionClass($class);
            } catch (\ReflectionException $e) {
                throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class));
            }

            $map = array_merge($map, self::getClassHierarchy($reflectionClass));
        }

        return $map;
    }
private static function getOrderedClasses ( array $ classes ) { $ map = array ( ) ; self :: $ seen = array ( ) ; foreach ( $ classes as $ class ) { try { $ reflectionClass = new \ ReflectionClass ( $ class ) ; } catch ( \ ReflectionException $ e ) { throw new \ InvalidArgumentException ( sprintf ( 'Unable to load class "%s"' , $ class ) ) ; } $ map = array_merge ( $ map , self :: getClassHierarchy ( $ reflectionClass ) ) ; } return $ map ; }
Gets an ordered array of passed classes including all their dependencies.

@param array $classes

@return \ReflectionClass[] An array of sorted \ReflectionClass instances (dependencies added if needed)

@throws \InvalidArgumentException When a class can't be loaded
Gets an ordered array of passed classes including all their dependencies .