Ed. Added php pattern an "observer".