1 | <?php |
||
24 | trait UserEntityTrait |
||
25 | { |
||
26 | /** |
||
27 | * Returns a new instance of the required entity. |
||
28 | * |
||
29 | * @param string $entityClassName |
||
30 | * @throws RuntimeException |
||
31 | * @return EntityInterface |
||
32 | */ |
||
33 | abstract protected function getNewEntityInstance(string $entityClassName) : EntityInterface; |
||
34 | |||
35 | /** |
||
36 | * Creates a new User Entity instance form the data. |
||
37 | * |
||
38 | * @param array $data |
||
39 | * @return UserEntity |
||
40 | */ |
||
41 | 2 | protected function createUserEntity(array $data) : UserEntity |
|
58 | } |
||
59 |