You are here

public function SymfonyFileLocator::__construct in Zircon Profile 8

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

Constructor.

Parameters

array $prefixes:

string|null $fileExtension:

string $nsSeparator String which would be used when converting FQCN to filename and vice versa. Should not be empty:

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php, line 70

Class

SymfonyFileLocator
The Symfony File Locator makes a simplifying assumptions compared to the DefaultFileLocator. By assuming paths only contain entities of a certain namespace the mapping files consists of the short classname only.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function __construct(array $prefixes, $fileExtension = null, $nsSeparator = '.') {
  $this
    ->addNamespacePrefixes($prefixes);
  $this->fileExtension = $fileExtension;
  if (empty($nsSeparator)) {
    throw new \InvalidArgumentException('Namespace separator should not be empty');
  }
  $this->nsSeparator = (string) $nsSeparator;
}