1 | <?php |
||
11 | class TwitterDirectMessageSerializer implements TwitterSerializer |
||
12 | { |
||
13 | /** |
||
14 | * @var TwitterUserSerializer |
||
15 | */ |
||
16 | private $userSerializer; |
||
17 | |||
18 | /** |
||
19 | * @var TwitterEntitiesSerializer |
||
20 | */ |
||
21 | private $twitterEntitiesSerializer; |
||
22 | |||
23 | /** |
||
24 | * @param TwitterUserSerializer $userSerializer |
||
25 | * @param TwitterEntitiesSerializer $twitterEntitiesSerializer |
||
26 | */ |
||
27 | 18 | public function __construct( |
|
34 | |||
35 | /** |
||
36 | * @param TwitterSerializable $object |
||
37 | * @return \stdClass |
||
38 | */ |
||
39 | 6 | public function serialize(TwitterSerializable $object) |
|
59 | |||
60 | /** |
||
61 | * @param \stdClass $directMessage |
||
62 | * @param array $context |
||
63 | * @return TwitterDirectMessage |
||
64 | */ |
||
65 | 6 | public function unserialize($directMessage, array $context = []) |
|
81 | |||
82 | /** |
||
83 | * @param TwitterSerializable $object |
||
84 | * @return boolean |
||
85 | */ |
||
86 | 6 | public function canSerialize(TwitterSerializable $object) |
|
90 | |||
91 | /** |
||
92 | * @param \stdClass $object |
||
93 | * @return boolean |
||
94 | */ |
||
95 | 6 | public function canUnserialize($object) |
|
99 | |||
100 | /** |
||
101 | * @return TwitterDirectMessageSerializer |
||
102 | */ |
||
103 | 6 | public static function build() |
|
110 | } |
||
111 |