1 | <?php |
||
16 | class TermSerializer implements Serializer { |
||
17 | |||
18 | /** |
||
19 | * @param Term $object |
||
20 | * |
||
21 | * @return string[] |
||
22 | */ |
||
23 | 7 | public function serialize( $object ) { |
|
27 | |||
28 | 7 | private function assertIsSerializerFor( $object ) { |
|
29 | 7 | if ( !( $object instanceof Term ) ) { |
|
30 | 1 | throw new UnsupportedObjectException( |
|
31 | $object, |
||
32 | 1 | 'TermSerializer can only serialize Term objects' |
|
33 | ); |
||
34 | } |
||
35 | 6 | } |
|
36 | |||
37 | /** |
||
38 | * @param Term $term |
||
39 | * |
||
40 | * @return string[] |
||
41 | */ |
||
42 | 6 | private function getSerialized( Term $term ) { |
|
55 | |||
56 | } |
||
57 |