A simple example for Observer Pattern

This commit is contained in:
John Skoumbourdis
2013-05-14 08:05:42 +01:00
parent cd2183b2a2
commit cb4a9de3be

View File

@@ -87,3 +87,8 @@ class User implements \SplSubject
$this->notify();
}
}
$user = new User();
$user->attach(new UserObserver());
$user->notify();