src/Core/ClassInfo.php
public static function classes_for_folder($folderPath)
    {
        $absFolderPath = Director::getAbsFile($folderPath);
        $classManifest = ClassLoader::inst()->getManifest();
        $classes = $classManifest->getClasses();
        $classNames = $classManifest->getClassNames();

        $matchedClasses = [];
        foreach ($classes as $lowerClass => $compareFilePath) {
            if (stripos($compareFilePath, $absFolderPath) === 0) {
                $matchedClasses[$lowerClass] = $classNames[$lowerClass];
            }
        }

        return $matchedClasses;
    }
public static function classes_for_folder($folderPath)
    {
        $absFolderPath = Director::getAbsFile($folderPath);
        $classManifest = ClassLoader::inst()->getManifest();
        $classes = $classManifest->getClasses();
        $classNames = $classManifest->getClassNames();

        $matchedClasses = [];
        foreach ($classes as $lowerClass => $compareFilePath) {
            if (stripos($compareFilePath, $absFolderPath) === 0) {
                $matchedClasses[$lowerClass] = $classNames[$lowerClass];
            }
        }

        return $matchedClasses;
    }
public static function classes_for_folder ( $ folderPath ) { $ absFolderPath = Director :: getAbsFile ( $ folderPath ) ; $ classManifest = ClassLoader :: inst ( ) -> getManifest ( ) ; $ classes = $ classManifest -> getClasses ( ) ; $ classNames = $ classManifest -> getClassNames ( ) ; $ matchedClasses = [ ] ; foreach ( $ classes as $ lowerClass => $ compareFilePath ) { if ( stripos ( $ compareFilePath , $ absFolderPath ) === 0 ) { $ matchedClasses [ $ lowerClass ] = $ classNames [ $ lowerClass ] ; } } return $ matchedClasses ; }
Returns all classes contained in a certain folder.

@param string $folderPath Relative or absolute folder path
@return array Map of lowercase class names to correct class name
Returns all classes contained in a certain folder .