The Horde_Notification library provides a subject-observer pattern for raising and showing messages of different types and to different listeners.