public function AnnotationDriver::__construct

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.

Parameters

AnnotationReader $reader The AnnotationReader to use, duck-typed.:

string|array $paths One or multiple paths where mapping classes can be found.:

File

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

Class

AnnotationDriver
The AnnotationDriver reads the mapping metadata from docblock annotations.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function __construct($reader, $paths = null) {
  $this->reader = $reader;
  if ($paths) {
    $this
      ->addPaths((array) $paths);
  }
}