processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

Add AddHookUrl() method for better readability #492

Open ivangretsky opened 1 year ago

ivangretsky commented 1 year ago

Short description of the enhancement

Add AddHookUrl() method as an alias for AddHook() for better readability

Why would the enhancement be useful to users?

Debugging URL hooks will be way easier.

BernhardBaumrock commented 1 year ago

Why would that make debugging easier?

Personally I was totally confused reading this. I'd expected something like "addUrlHook" instead. But of course your version is in line with present naming like addHookMethod and addHookProperty. Not sure - but just wanted to mention that it was really confusing for me to see hook-url when I'm used to the term url-hook.

ivangretsky commented 1 year ago

Yep, the naming is to be in line with existing methods.

Why would that make debugging easier?

Easier to find only the hooks that add url handlers.

BernhardBaumrock commented 1 year ago

You mean by searching your codebase for "addHookUrl" or what are you talking about?