1 | <?php |
||
12 | trait CreateModel |
||
13 | { |
||
14 | /** |
||
15 | * Create model from `$data`. |
||
16 | * |
||
17 | * NOTE: It requires `getModel` method accessible |
||
18 | * within this method. |
||
19 | * |
||
20 | * NOTE: Do not declare abstract `getModel` here |
||
21 | * as *possibly* it might be protected or public in classes |
||
22 | * using this trait. |
||
23 | * |
||
24 | * @param $data |
||
25 | * @return AnnotatedInterface |
||
26 | * @throws ManganException |
||
27 | */ |
||
28 | 83 | protected function createModel($data) |
|
48 | } |