mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 05:58:42 +00:00
Make serializable
This commit is contained in:
parent
206b76ca23
commit
a8e9c7afab
|
|
@ -28,7 +28,7 @@ use phpOMS\Contract\JsonableInterface;
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
* @since 1.0.0
|
* @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());
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user