mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +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
|
||||
* @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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user