function register(Lesson $lesson) { // do something with this Lesson // now tell someone $notifier = Notifier::getNotifier(); $notifier->inform("new lesson: cost ({$lesson->cost()})"); }
public function register(Lesson $lesson) { // marking registration // ... // notify $notifier = Notifier::getNotifier(); $notifier->inform("new lesson. cost = {$lesson->cost()}"); }