thunderer/Shortcode

View on GitHub
src/Serializer/SerializerInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace Thunder\Shortcode\Serializer;

use Thunder\Shortcode\Shortcode\ShortcodeInterface;

/**
 * @author Tomasz Kowalczyk <tomasz@kowalczyk.cc>
 */
interface SerializerInterface
{
    /**
     * Serializes Shortcode class instance into given format
     *
     * @param ShortcodeInterface $shortcode Instance to serialize
     *
     * @return string
     */
    public function serialize(ShortcodeInterface $shortcode);

    /**
     * Loads back Shortcode instance from serialized format
     *
     * @param string $text
     *
     * @return ShortcodeInterface
     */
    public function unserialize($text);
}