src/EntityManager/EntityMapAbstractFactory.php 1 location
|
@@ 155-160 (lines=6) @@
|
| 152 |
|
throw new Exception\RuntimeException($errMsg); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
if ($serviceLocator->has($className)) { |
| 156 |
|
$entity = $serviceLocator->get($className); |
| 157 |
|
} else { |
| 158 |
|
$r = new ReflectionClass($className); |
| 159 |
|
$entity = $r->newInstance(); |
| 160 |
|
} |
| 161 |
|
$this->prototype[$requestedName] = $entity; |
| 162 |
|
|
| 163 |
|
return $entity; |
src/EntityManager/OrmEntityAbstractFactory.php 1 location
|
@@ 90-95 (lines=6) @@
|
| 87 |
|
|
| 88 |
|
$entityClassName = $ormEntityLocator->get($requestedName); |
| 89 |
|
|
| 90 |
|
if ($serviceLocator->has($entityClassName)) { |
| 91 |
|
$entity = $serviceLocator->get($entityClassName); |
| 92 |
|
} else { |
| 93 |
|
$r = new ReflectionClass($entityClassName); |
| 94 |
|
$entity = $r->newInstance(); |
| 95 |
|
} |
| 96 |
|
$this->prototype[$requestedName] = $entity; |
| 97 |
|
|
| 98 |
|
|