Doctrine\OXM\Mapping\Driver\AbstractFileDriver::getAllClassNames PHP Method

getAllClassNames() public method

Gets the names of all mapped classes known to this driver.
public getAllClassNames ( ) : array
return array The names of all mapped classes known to this driver.
    public function getAllClassNames()
    {
        $classes = array();
        if ($this->paths) {
            foreach ((array) $this->paths as $path) {
                if (!is_dir($path)) {
                    throw MappingException::fileMappingDriversRequiresConfiguredDirectoryPath($path);
                }
                $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::LEAVES_ONLY);
                foreach ($iterator as $file) {
                    if (($fileName = $file->getBasename($this->fileExtension)) == $file->getBasename()) {
                        continue;
                    }
                    // NOTE: All files found here means classes are not transient!
                    $classes[] = str_replace('.', '\\', $fileName);
                }
            }
        }
        return $classes;
    }