Make serializable

This commit is contained in:
Dennis Eichhorn 2016-02-01 21:04:58 +01:00
parent 206b76ca23
commit a8e9c7afab

View File

@ -28,7 +28,7 @@ use phpOMS\Contract\JsonableInterface;
* @link http://orange-management.com
* @since 1.0.0
*/
class Location implements JsonableInterface
class Location implements JsonableInterface, \Serializable
{
/**
@ -256,4 +256,27 @@ class Location implements JsonableInterface
return json_encode($this->toArray());
}
/**
* String representation of object
* @link http://php.net/manual/en/serializable.serialize.php
* @return string the string representation of the object or null
* @since 5.1.0
*/
public function serialize()
{
return $this->toJson();
}
/**
* Constructs the object
* @link http://php.net/manual/en/serializable.unserialize.php
* @param string $serialized <p>
* The string representation of the object.
* </p>
* @return void
* @since 5.1.0
*/
public function unserialize($serialized)
{
}
}