[dev] hooks

Chuck Hagenbuch chuck at horde.org
Sun May 4 11:10:06 PDT 2003


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

--
Charles Hagenbuch, <chuck at horde.org>
The alligators were there, too, in a bathtub inside the house.


More information about the dev mailing list