Mercurial > hg > isophonics-drupal-site
view vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassThatImplementsSerializable.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
line wrap: on
line source
<?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; } } }