| 1 | <?php |
||
| 20 | abstract class Entity extends Base implements EntityInterface |
||
| 21 | { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Saves current entity state |
||
| 25 | * |
||
| 26 | * Optionally saves only the partial data if $data argument is passed. If |
||
| 27 | * no data is given al the field properties will be updated. |
||
| 28 | * |
||
| 29 | * @param array $data Partial data to save |
||
| 30 | * |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | 2 | public function save(array $data = []) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Deletes current entity from its storage |
||
| 42 | * |
||
| 43 | * @return self|$this|EntityInterface |
||
| 44 | */ |
||
| 45 | public function delete() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Retrieves the data mapper for this entity |
||
| 53 | */ |
||
| 54 | 2 | public function getMapper() |
|
| 58 | } |