public function DefaultFileLocator::findMappingFile

Locate mapping file for the given class name.

Parameters

string $className:

Return value

string

Overrides FileLocator::findMappingFile

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php, line 106

Class

DefaultFileLocator
Locate the file that contains the metadata information for a given class name.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function findMappingFile($className) {
  $fileName = str_replace('\\', '.', $className) . $this->fileExtension;

  // Check whether file exists
  foreach ($this->paths as $path) {
    if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
      return $path . DIRECTORY_SEPARATOR . $fileName;
    }
  }
  throw MappingException::mappingFileNotFound($className, $fileName);
}