Get all class names that are found with this file locator.
string $globalBasename Passed to allow excluding the basename:
array
Overrides FileLocator::getAllClassNames
public function getAllClassNames($globalBasename = null) {
$classes = array();
if ($this->paths) {
foreach ((array) $this->paths as $path) {
if (!is_dir($path)) {
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
}
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::LEAVES_ONLY);
foreach ($iterator as $file) {
$fileName = $file
->getBasename($this->fileExtension);
if ($fileName == $file
->getBasename() || $fileName == $globalBasename) {
continue;
}
// NOTE: All files found here means classes are not transient!
if (isset($this->prefixes[$path])) {
$classes[] = $this->prefixes[$path] . '\\' . str_replace('.', '\\', $fileName);
}
else {
$classes[] = str_replace('.', '\\', $fileName);
}
}
}
}
return $classes;
}