src/ORM/DatabaseAdmin.php
public function groupedDataClasses()
    {
        // Get all root data objects
        $allClasses = get_declared_classes();
        $rootClasses = [];
        foreach ($allClasses as $class) {
            if (get_parent_class($class) == DataObject::class) {
                $rootClasses[$class] = array();
            }
        }

        // Assign every other data object one of those
        foreach ($allClasses as $class) {
            if (!isset($rootClasses[$class]) && is_subclass_of($class, DataObject::class)) {
                foreach ($rootClasses as $rootClass => $dummy) {
                    if (is_subclass_of($class, $rootClass)) {
                        $rootClasses[$rootClass][] = $class;
                        break;
                    }
                }
            }
        }
        return $rootClasses;
    }
public function groupedDataClasses()
    {
        // Get all root data objects
        $allClasses = get_declared_classes();
        $rootClasses = [];
        foreach ($allClasses as $class) {
            if (get_parent_class($class) == DataObject::class) {
                $rootClasses[$class] = array();
            }
        }

        // Assign every other data object one of those
        foreach ($allClasses as $class) {
            if (!isset($rootClasses[$class]) && is_subclass_of($class, DataObject::class)) {
                foreach ($rootClasses as $rootClass => $dummy) {
                    if (is_subclass_of($class, $rootClass)) {
                        $rootClasses[$rootClass][] = $class;
                        break;
                    }
                }
            }
        }
        return $rootClasses;
    }
public function groupedDataClasses ( ) { // Get all root data objects $ allClasses = get_declared_classes ( ) ; $ rootClasses = [ ] ; foreach ( $ allClasses as $ class ) { if ( get_parent_class ( $ class ) == DataObject :: class ) { $ rootClasses [ $ class ] = array ( ) ; } } // Assign every other data object one of those foreach ( $ allClasses as $ class ) { if ( ! isset ( $ rootClasses [ $ class ] ) && is_subclass_of ( $ class , DataObject :: class ) ) { foreach ( $ rootClasses as $ rootClass => $ dummy ) { if ( is_subclass_of ( $ class , $ rootClass ) ) { $ rootClasses [ $ rootClass ] [ ] = $ class ; break ; } } } } return $ rootClasses ; }
Get the data classes, grouped by their root class

@return array Array of data classes, grouped by their root class
Get the data classes grouped by their root class