You are here

public function DefaultFileLocator::fileExists in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php \Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator::fileExists()

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

Parameters

string $className:

Return value

bool

Overrides FileLocator::fileExists

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php, line 160

Class

DefaultFileLocator
Locates 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 (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
      return true;
    }
  }
  return false;
}