It's About Time

HookPHP provides method hooking in PHP. That's something we all wanted anyway, right?

Method Hooking is Really Useful

I use it for all sorts of things. You can too.

What Use is Method Hooking?

I use method hooking in Tilmeld to intercept every call to Nymph and add access control selectors. This keeps queries from the front end secure, without having to alter Nymph's code.

I use method hooking to format output of my CMS. This lets me add custom directives in my templates to be altered by custom callbacks.

I use method hooking to add access control properties to every entity saved by Nymph. I add a user, group, and permissions to every entity.

I use method hooking to delete related entities when a category in my ecommerce software is deleted.

I use method hooking to alter any URL generated in my project to have certain parameters depending on whether debugging in the application is enabled.