| @@ 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 = []; |
|
| @@ 235-243 (lines=9) @@ | ||
| 232 | } |
|
| 233 | ||
| 234 | $class = Entity::class; |
|
| 235 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 236 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 237 | if ($entityClass) { |
|
| 238 | if ($class != Entity::class) { |
|
| 239 | throw new Exception('Entity class override'); |
|
| 240 | } |
|
| 241 | $class = $entityClass; |
|
| 242 | } |
|
| 243 | } |
|
| 244 | ||
| 245 | $instance = new $class($this); |
|
| 246 | ||