| @@ 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 = []; |
|
| @@ 188-196 (lines=9) @@ | ||
| 185 | } |
|
| 186 | ||
| 187 | $class = Entity::class; |
|
| 188 | foreach ($this->getMapper()->getPlugins() as $plugin) { |
|
| 189 | $entityClass = $plugin->getEntityClass($this->space); |
|
| 190 | if ($entityClass) { |
|
| 191 | if ($class != Entity::class) { |
|
| 192 | throw new Exception('Entity class override'); |
|
| 193 | } |
|
| 194 | $class = $entityClass; |
|
| 195 | } |
|
| 196 | } |
|
| 197 | ||
| 198 | $instance = new $class($this); |
|
| 199 | ||