mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-20 04:44:05 +00:00
16 lines
322 B
PHP
16 lines
322 B
PHP
<?php
|
|
class ClassThatImplementsSerializable implements Serializable
|
|
{
|
|
public function serialize()
|
|
{
|
|
return get_object_vars($this);
|
|
}
|
|
|
|
public function unserialize($serialized)
|
|
{
|
|
foreach (unserialize($serialized) as $key => $value) {
|
|
$this->{$key} = $value;
|
|
}
|
|
}
|
|
}
|