1 | <?php |
||
11 | trait ApiSerializerTrait { |
||
12 | |||
13 | /** |
||
14 | * @param mixed $model |
||
15 | * @param mixed $related |
||
16 | */ |
||
17 | public function action($model, $related) { |
||
25 | |||
26 | /** |
||
27 | * @param mixed $model |
||
28 | * @param array $fields |
||
29 | */ |
||
30 | public function getAttributes($model, array $fields = null) { |
||
39 | |||
40 | /** |
||
41 | */ |
||
42 | public function getFields() { |
||
45 | |||
46 | /** |
||
47 | * @param mixed $model |
||
48 | */ |
||
49 | public function getId($model) { |
||
52 | |||
53 | /** |
||
54 | */ |
||
55 | public function getRelationships() { |
||
60 | |||
61 | /** |
||
62 | */ |
||
63 | public function getSortFields() { |
||
66 | |||
67 | /** |
||
68 | * @param mixed $model |
||
69 | */ |
||
70 | public function getType($model) { |
||
73 | |||
74 | /** |
||
75 | * @param mixed $model |
||
76 | * @param mixed $data |
||
77 | */ |
||
78 | public function hydrate($model, $data) { |
||
89 | |||
90 | /** |
||
91 | * @param mixed $model |
||
92 | * @param mixed $data |
||
93 | */ |
||
94 | public function setAction($model, $data) { |
||
97 | } |
||
98 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.