Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Serializer; Chris@0: Chris@0: /** Chris@0: * Defines the interface of the Serializer. Chris@0: * Chris@0: * @author Jordi Boggiano Chris@0: */ Chris@0: interface SerializerInterface Chris@0: { Chris@0: /** Chris@0: * Serializes data in the appropriate format. Chris@0: * Chris@14: * @param mixed $data Any data Chris@14: * @param string $format Format name Chris@14: * @param array $context Options normalizers/encoders have access to Chris@0: * Chris@0: * @return string Chris@0: */ Chris@17: public function serialize($data, $format, array $context = []); Chris@0: Chris@0: /** Chris@0: * Deserializes data into the given type. Chris@0: * Chris@0: * @param mixed $data Chris@0: * @param string $type Chris@0: * @param string $format Chris@0: * @param array $context Chris@0: * Chris@0: * @return object Chris@0: */ Chris@17: public function deserialize($data, $type, $format, array $context = []); Chris@0: }