refactoring of event and error handling #php #pimf #framework