lithium\storage\cache\strategy\Serializer
Extends
lithium\core\Object
An PHP Serialization strategy.
Source
class Serializer extends \lithium\core\Object {
/**
* Write strategy method.
*
* Serializes the passed data.
*
* @link http://php.net/function.serialize.php PHP Manual: serialize()
* @param mixed $data The data to be serialized.
* @return string Serialized data.
*/
public function write($data) {
return serialize($data);
}
/**
* Read strategy method.
*
* Unserializes the passed data.
*
* @link http://php.net/function.unserialize.php PHP Manual: unserialize()
* @param string $data Serialized data.
* @return mixed Result of unserialization.
*/
public function read($data) {
return unserialize($data);
}
}