Mercurial > hg > isophonics-drupal-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 class ClassThatImplementsSerializable implements Serializable | |
3 { | |
4 public function serialize() | |
5 { | |
6 return get_object_vars($this); | |
7 } | |
8 | |
9 public function unserialize($serialized) | |
10 { | |
11 foreach (unserialize($serialized) as $key => $value) { | |
12 $this->{$key} = $value; | |
13 } | |
14 } | |
15 } |