1 <?php
 2 /**
 3  * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
 4  */
 5 namespace Team3\PayU\Serializer;
 6 
 7 use JMS\Serializer\SerializationContext;
 8 
 9 /**
10  * This class is responsible for serialization and deserialization to and from JSON format.
11  *
12  * Interface SerializerInterface
13  * @package Team3\PayU\Serializer
14  */
15 interface SerializerInterface
16 {
17     /**
18      * @param SerializableInterface $serializable
19      * @param SerializationContext  $serializationContext
20      *
21      * @return string
22      */
23     public function toJson(
24         SerializableInterface $serializable,
25         SerializationContext $serializationContext = null
26     );
27 
28     /**
29      * @param string $data
30      * @param string $type
31      *
32      * @return mixed
33      */
34     public function fromJson($data, $type);
35 }
36