a php hook base framework