diff --git a/Datatypes/Location.php b/Datatypes/Location.php index ae392fcd5..b6a3f52e6 100644 --- a/Datatypes/Location.php +++ b/Datatypes/Location.php @@ -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

+ * The string representation of the object. + *

+ * @return void + * @since 5.1.0 + */ + public function unserialize($serialized) + { + } }