[dev] hooks

Marko Djukic marko at oblo.com
Sun May 4 21:02:59 PDT 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Marko Djukic <marko at oblo.com>:
>
> > would it make sense to have something like a Horde::callHook($app,
> > $function) which would check if it can require that app's hook file and
> > call the function. this would cut out a lot of the repetitive code of
> > including the hooks file, checking if the function exists, calling the
> > function etc. is there any advantage to distributing the functions to
> > their corresponding app's hook file? if not then just a simple
> > callHook($function), and stick with the one /horde/config/hooks.php
>
> Yeah, that sounds like it makes sense. The reason to split hooks out would
> be to save overhead if there was a lot of code in there; this would
> probably lose its advantage if you were including even two hooks files,
> though, and I kinda like the idea of keeping it all centralized. So I'd
> vote for just the one file, and callHook($function).
>
> -chuck

ok, i'll get something committed.

marko


More information about the dev mailing list