1 | <?php |
||
11 | class TwitterEventTargetSerializer implements TwitterSerializer |
||
12 | { |
||
13 | /** |
||
14 | * @var TweetSerializer |
||
15 | */ |
||
16 | private $tweetSerializer; |
||
17 | |||
18 | /** |
||
19 | * @param TweetSerializer $tweetSerializer |
||
20 | */ |
||
21 | 24 | public function __construct(TweetSerializer $tweetSerializer) |
|
22 | { |
||
23 | 24 | $this->tweetSerializer = $tweetSerializer; |
|
24 | 24 | } |
|
25 | |||
26 | /** |
||
27 | * @param TwitterSerializable $object |
||
28 | * @return \stdClass |
||
29 | */ |
||
30 | 9 | public function serialize(TwitterSerializable $object) |
|
40 | |||
41 | /** |
||
42 | * @param \stdClass $obj |
||
43 | * @param array $context |
||
44 | * @return TwitterEventTarget |
||
45 | */ |
||
46 | 6 | public function unserialize($obj, array $context = []) |
|
54 | |||
55 | /** |
||
56 | * @param TwitterSerializable $object |
||
57 | * @return boolean |
||
58 | */ |
||
59 | 9 | public function canSerialize(TwitterSerializable $object) |
|
63 | |||
64 | /** |
||
65 | * @param \stdClass $object |
||
66 | * @return boolean |
||
67 | */ |
||
68 | 6 | public function canUnserialize($object) |
|
72 | |||
73 | /** |
||
74 | * @return TwitterEventTargetSerializer |
||
75 | */ |
||
76 | 9 | public static function build() |
|
82 | } |
||
83 |