A simple php hook class