*/ namespace Phacil\Framework\Interfaces; /** * Interface for serializing * * @api * @since 2.0.0 */ interface Serializer { /** * Serialize data into string * * @param string|int|float|bool|array|null $data * @return string|bool * @throws \InvalidArgumentException * @since 2.0.0 */ public function serialize($data); /** * Unserialize the given string * * @param string $string * @return string|int|float|bool|array|null * @throws \InvalidArgumentException * @since 2.0.0 */ public function unserialize($string); }