1 | <?php |
||
16 | abstract class AbstractSerializer implements SerializerInterface |
||
17 | { |
||
18 | /** |
||
19 | * The type. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $type; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function getType($model) |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function getId($model) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function getAttributes($model, array $fields = null) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function getLinks($model) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | * |
||
60 | * @throws LogicException |
||
61 | */ |
||
62 | public function getRelationship($model, $name) |
||
79 | |||
80 | /** |
||
81 | * Removes all dashes from relationsship and uppercases the following letter. |
||
82 | * @example If relationship parent-page is needed the the function name will be changed to parentPage |
||
83 | * |
||
84 | * @param string Name of the function |
||
85 | * |
||
86 | * @return string New function name |
||
87 | */ |
||
88 | private function replaceDashWithUppercase($name) |
||
92 | } |
||
93 |