diff --git a/Behavioral/Observer/User.php b/Behavioral/Observer/User.php index 03cfce8..79a13f7 100644 --- a/Behavioral/Observer/User.php +++ b/Behavioral/Observer/User.php @@ -15,6 +15,7 @@ use SplObserver; class User implements SplSubject { private SplObjectStorage $observers; + private $email; public function __construct() { @@ -33,6 +34,7 @@ class User implements SplSubject public function changeEmail(string $email) { + $this->email = $email; $this->notify(); }