1 | <?php |
||
24 | abstract class AsArray implements Arrayable |
||
25 | { |
||
26 | /** |
||
27 | * Returns only protected and public properties of the given model-object. |
||
28 | * For another properties output format, please override this method. |
||
29 | * |
||
30 | * @return array A list of properties. |
||
31 | */ |
||
32 | public function toArray() |
||
36 | |||
37 | /** |
||
38 | * Maps the properties to array with actual values. |
||
39 | * For another properties-mapping, please override this method. |
||
40 | * |
||
41 | * @param array $properties |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | protected function map(array $properties) |
||
55 | } |
||
56 |