Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
54 | public function save(ActiveRecordInterface $Model) |
||
55 | { |
||
56 | if (!$Model->validate()) { |
||
57 | |||
58 | throw new \Frameworkless\Exceptions\ValidateException("User not validate", $Model->getValidationFailures()); |
||
59 | } |
||
60 | |||
61 | |||
62 | if (!$Model->save()) { |
||
63 | throw new \DomainException(sprintf('User not save',$id)); |
||
64 | } |
||
65 | |||
66 | return true; |
||
67 | } |
||
68 | |||
78 |