public function DefaultFileLocator::fileExists

Check if a file can be found for this class name.

Parameters

string $className:

Return value

bool

Overrides FileLocator::fileExists

File

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

Class

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

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function fileExists($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 true;
    }
  }
  return false;
}