Lines n/a 0 / 0
Functions and Methods n/a 0 / 0
Classes and Traits n/a 0 / 0
Name Lines Functions and Methods CRAP Classes and Traits
1<?php
2
3declare(strict_types=1);
4
5namespace Tomaj\Hermes;
6
7interface SerializerInterface
8{
9    /**
10     * Message serialization
11     *
12     * Method is used when serializing $message to driver.
13     * Message has to be serializable to string.
14     *
15     * @throws SerializeException
16     */
17    public function serialize(MessageInterface $message): string;
18
19    /**
20     * Opposite serialize method.
21     *
22     * Message needs to be un-serialized from input string.
23     * This string will be received from driver.
24     *
25     * @throws SerializeException
26     */
27    public function unserialize(string $string): MessageInterface;
28}