lib/Doctrine/ORM/Mapping/Factory/Autoloader.php
public static function resolveFile(string $metadataDir, string $metadataNamespace, string $className) : string
    {
        if (strpos($className, $metadataNamespace) !== 0) {
            throw new InvalidArgumentException(
                sprintf('The class "%s" is not part of the metadata namespace "%s"', $className, $metadataNamespace)
            );
        }

        // remove metadata namespace from class name
        $classNameRelativeToMetadataNamespace = substr($className, strlen($metadataNamespace));

        // remove namespace separators from remaining class name
        $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace);

        return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php';
    }
public static function resolveFile(string $metadataDir, string $metadataNamespace, string $className) : string
    {
        if (strpos($className, $metadataNamespace) !== 0) {
            throw new InvalidArgumentException(
                sprintf('The class "%s" is not part of the metadata namespace "%s"', $className, $metadataNamespace)
            );
        }

        // remove metadata namespace from class name
        $classNameRelativeToMetadataNamespace = substr($className, strlen($metadataNamespace));

        // remove namespace separators from remaining class name
        $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace);

        return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php';
    }
public static function resolveFile ( string $ metadataDir , string $ metadataNamespace , string $ className ) : string { if ( strpos ( $ className , $ metadataNamespace ) !== 0 ) { throw new InvalidArgumentException ( sprintf ( 'The class "%s" is not part of the metadata namespace "%s"' , $ className , $ metadataNamespace ) ) ; } // remove metadata namespace from class name $ classNameRelativeToMetadataNamespace = substr ( $ className , strlen ( $ metadataNamespace ) ) ; // remove namespace separators from remaining class name $ fileName = str_replace ( '\\' , '' , $ classNameRelativeToMetadataNamespace ) ; return $ metadataDir . DIRECTORY_SEPARATOR . $ fileName . '.php' ; }
Resolves ClassMetadata class name to a filename based on the following pattern.

1. Remove Metadata namespace from class name.
2. Remove namespace separators from remaining class name.
3. Return PHP filename from metadata-dir with the result from 2.

@throws InvalidArgumentException
Resolves ClassMetadata class name to a filename based on the following pattern .