You are here

public function FileDriver::__construct in Plug 7

Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.

Parameters

string|array|FileLocator $locator A FileLocator or one/multiple paths: where mapping documents can be found.

string|null $fileExtension:

1 call to FileDriver::__construct()
PHPDriver::__construct in lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php
Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.
1 method overrides FileDriver::__construct()
PHPDriver::__construct in lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php
Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.

File

lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php, line 64

Class

FileDriver
Base driver for file-based metadata drivers.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function __construct($locator, $fileExtension = null) {
  if ($locator instanceof FileLocator) {
    $this->locator = $locator;
  }
  else {
    $this->locator = new DefaultFileLocator((array) $locator, $fileExtension);
  }
}