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

findMappingFile() protected method

Finds the mapping file for the class with the given name by searching through the configured paths.
protected findMappingFile ( $className ) : string
$className
return string The (absolute) file name.
    protected function findMappingFile($className)
    {
        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
        // Check whether file exists
        foreach ((array) $this->paths as $path) {
            if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
                return $path . DIRECTORY_SEPARATOR . $fileName;
            }
        }
        return false;
        //throw MappingException::mappingFileNotFound($className, $fileName);
    }