| @@ 29-37 (lines=9) @@ | ||
| 26 | { |
|
| 27 | $data = (array) $data; |
|
| 28 | $class = Entity::class; |
|
| 29 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 30 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 31 | if ($entityClass) { |
|
| 32 | if ($class != Entity::class) { |
|
| 33 | throw new Exception('Entity class override'); |
|
| 34 | } |
|
| 35 | $class = $entityClass; |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| 39 | if (array_key_exists(0, $data)) { |
|
| 40 | $byType = []; |
|
| @@ 216-224 (lines=9) @@ | ||
| 213 | } |
|
| 214 | ||
| 215 | $class = Entity::class; |
|
| 216 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 217 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 218 | if ($entityClass) { |
|
| 219 | if ($class != Entity::class) { |
|
| 220 | throw new Exception('Entity class override'); |
|
| 221 | } |
|
| 222 | $class = $entityClass; |
|
| 223 | } |
|
| 224 | } |
|
| 225 | ||
| 226 | $instance = new $class($this); |
|
| 227 | ||