[development] Turning custom_url_rewrite_* into hooks?

Gábor Hojtsy gabor at hojtsy.hu
Wed Oct 29 22:00:57 UTC 2008


John points out it is required before hooks are available. Also, it
was deemed not as good for performance to look for hooks, and better
for performance to only look for one specific function. With the code
registry in Drupal 7, the modules defining hooks are pre-parsed, so
we'd know a list of functions to call from that cache. That might
mitigate the performance problems. Would probably need to be
benchmarked (invoke hook with one implementation vs. invoke the
well-known-named function). For API consistency, I agree that making
this a hook would be better, if you can make it work early enough in
the bootstrap :)

Gábor

On Wed, Oct 29, 2008 at 3:17 PM, Steven Surowiec <steven at digitalpulp.com> wrote:
> I've working on a custom module for a project that makes use of
> custom_url_rewrite to open up linking shortcuts through the url() function
> and I was wondering if there is any specific reason this functionality isn't
> a regular hook? I know I could probably use URL aliases for what I'm trying
> to do but requires me to not have to worry about managing hundreds, possibly
> thousands, of URL aliases just to open up this type of functionality. Maybe
> I'm just mis-using this functionality but it seems like it might be worth
> while to consider.
>


More information about the development mailing list