lib/Doctrine/ORM/Configuration.php 1 location
|
@@ 173-180 (lines=8) @@
|
170 |
|
* |
171 |
|
* @return AnnotationDriver |
172 |
|
*/ |
173 |
|
public function newDefaultAnnotationDriver($paths = []) |
174 |
|
{ |
175 |
|
AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php'); |
176 |
|
|
177 |
|
$reader = new CachedReader(new AnnotationReader(), new ArrayCache()); |
178 |
|
|
179 |
|
return new AnnotationDriver($reader, (array) $paths); |
180 |
|
} |
181 |
|
|
182 |
|
/** |
183 |
|
* Adds a namespace under a certain alias. |
tests/Doctrine/Tests/OrmTestCase.php 1 location
|
@@ 66-73 (lines=8) @@
|
63 |
|
* |
64 |
|
* @return \Doctrine\ORM\Mapping\Driver\AnnotationDriver |
65 |
|
*/ |
66 |
|
protected function createAnnotationDriver($paths = []) |
67 |
|
{ |
68 |
|
$reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache()); |
69 |
|
|
70 |
|
Annotations\AnnotationRegistry::registerFile(__DIR__ . "/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php"); |
71 |
|
|
72 |
|
return new AnnotationDriver($reader, (array) $paths); |
73 |
|
} |
74 |
|
|
75 |
|
/** |
76 |
|
* Creates an EntityManager for testing purposes. |