| @@ 27-35 (lines=9) @@ | ||
| 24 | { |
|
| 25 | $data = (array) $data; |
|
| 26 | $class = Entity::class; |
|
| 27 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 28 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 29 | if ($entityClass) { |
|
| 30 | if ($class != Entity::class) { |
|
| 31 | throw new Exception('Entity class override'); |
|
| 32 | } |
|
| 33 | $class = $entityClass; |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| 37 | if (array_key_exists(0, $data)) { |
|
| 38 | $byType = []; |
|
| @@ 192-200 (lines=9) @@ | ||
| 189 | } |
|
| 190 | ||
| 191 | $class = Entity::class; |
|
| 192 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 193 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 194 | if ($entityClass) { |
|
| 195 | if ($class != Entity::class) { |
|
| 196 | throw new Exception('Entity class override'); |
|
| 197 | } |
|
| 198 | $class = $entityClass; |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||
| 202 | $instance = new $class($this); |
|
| 203 | ||