This repository has been archived on 2018-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
2014-05-07 14:05:13 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Sleepy - a REST framework
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* A PHP Rest Framework valuing convention over configuration,
|
|
|
|
* but aiming to be as flexible as possible
|
|
|
|
*
|
|
|
|
* @author Timothy J. Warren
|
|
|
|
*/
|
|
|
|
|
2014-05-14 10:32:31 -04:00
|
|
|
namespace Sleepy\Core\Interfaces;
|
2014-05-07 14:05:13 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for output formats
|
|
|
|
*/
|
2014-05-14 10:32:31 -04:00
|
|
|
interface Type {
|
2014-05-07 14:05:13 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert the data to the output format
|
|
|
|
*
|
|
|
|
* @param mixed $data
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function serialize($data);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert the format to php data
|
|
|
|
*
|
|
|
|
* @param string $data_string
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function unserialize($data_string);
|
|
|
|
|
|
|
|
}
|
2014-05-14 10:32:31 -04:00
|
|
|
// End of Core/Interfaces/Type.php
|