src/WebHemi/Data/Coupler/AbstractDataCoupler.php 1 location
|
@@ 76-83 (lines=8) @@
|
| 73 |
|
* @throws RuntimeException |
| 74 |
|
* @return DataEntityInterface |
| 75 |
|
*/ |
| 76 |
|
protected function getNewEntityInstance($entityClassName) |
| 77 |
|
{ |
| 78 |
|
if (!isset($this->dataEntityPrototypes[$entityClassName])) { |
| 79 |
|
throw new RuntimeException(sprintf('Class %s is not defined in this Coupler.', $entityClassName)); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
return clone $this->dataEntityPrototypes[$entityClassName]; |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
/** |
| 86 |
|
* Gets raw depending entity data list for the given entity. |
src/WebHemi/Data/Coupler/UserToGroupCoupler.php 1 location
|
@@ 57-64 (lines=8) @@
|
| 54 |
|
* @throws RuntimeException |
| 55 |
|
* @return DataEntityInterface |
| 56 |
|
*/ |
| 57 |
|
protected function getNewEntityInstance($entityClassName) |
| 58 |
|
{ |
| 59 |
|
if (!isset($this->dataEntityPrototypes[$entityClassName])) { |
| 60 |
|
throw new RuntimeException(sprintf('Class %s is not defined in this Coupler.', $entityClassName)); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
return clone $this->dataEntityPrototypes[$entityClassName]; |
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
/** |
| 67 |
|
* Gets all the entities those are depending from the given entity. |