BBnepal-Accounts/hostel/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassThatImplementsSerializable.php

16 lines
322 B
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<?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;
}
}
}