src/EntityManager/OrmEntityAbstractFactory.php 1 location
|
@@ 95-100 (lines=6) @@
|
92 |
|
|
93 |
|
$entityClassName = $ormEntityLocator->get($requestedName); |
94 |
|
|
95 |
|
if ($serviceLocator->has($entityClassName)) { |
96 |
|
$entity = $serviceLocator->get($entityClassName); |
97 |
|
} else { |
98 |
|
$r = new ReflectionClass($entityClassName); |
99 |
|
$entity = $r->newInstance(); |
100 |
|
} |
101 |
|
$this->prototype[$requestedName] = $entity; |
102 |
|
|
103 |
|
|
src/EntityManager/EntityMapAbstractFactory.php 1 location
|
@@ 171-176 (lines=6) @@
|
168 |
|
throw new Exception\RuntimeException($errMsg); |
169 |
|
} |
170 |
|
|
171 |
|
if ($serviceLocator->has($className)) { |
172 |
|
$entity = $serviceLocator->get($className); |
173 |
|
} else { |
174 |
|
$r = new ReflectionClass($className); |
175 |
|
$entity = $r->newInstance(); |
176 |
|
} |
177 |
|
$this->prototype[$requestedName] = $entity; |
178 |
|
|
179 |
|
return $entity; |