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) |
||
76 | |||
77 | /** |
||
78 | * Get the serializer method name for the given relationship. |
||
79 | * |
||
80 | * kebab-case is converted into camelCase. |
||
81 | * |
||
82 | * @param string $name |
||
83 | * @return string |
||
84 | */ |
||
85 | private function getRelationshipMethodName($name) |
||
93 | } |
||
94 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.