| 1 | <?php |
||
| 21 | class Person implements SerializableInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $name; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var Address |
||
| 30 | */ |
||
| 31 | protected $address; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Person constructor. |
||
| 35 | * |
||
| 36 | * @param string $name |
||
| 37 | * @param Address $address |
||
| 38 | */ |
||
| 39 | public function __construct($name, Address $address) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return Address |
||
| 47 | */ |
||
| 48 | public function address() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param Address $address |
||
| 55 | */ |
||
| 56 | public function setAddress($address) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function name() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param string $name |
||
| 71 | */ |
||
| 72 | public function setName($name) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param Person $other |
||
| 79 | * |
||
| 80 | * @return bool |
||
| 81 | */ |
||
| 82 | public function equals(Person $other) |
||
| 88 | } |
||
| 89 |