[dev] hooks

amith at xalan.com amith at xalan.com
Thu May 8 11:56:17 PDT 2003


Maybe there should be a hooks directory in /horde/config/ (so
/horde/config/hooks/)  and each hook has its own file.  And then include all
files in that directory.  I was think along the lines of what redhat is doing
for apache config files now.  Just a thought.

Amith

Quoting "Marcus I. Ryan" <marcus at horde.org>:

| My only comment on this is that, as somone who uses a lot of hooks,
| that one hooks.php file gets to be a lot to manage.  I suppose I
| personally could just split it out myself and include the other files
| where necessary, but it would be really nice if we could find an
| efficient way to split this out at least a little...the fine line
| between code efficiency and code management... :)
|
| --
| Marcus I. Ryan, marcus at horde.org
| -----------------------------------------------------------------------
|  "Love is a snowmobile racing across the tundra and then suddenly it
|  flips over, pinning you underneath.  At night, the ice weasels come."
|                  -- Matt Groening
| -----------------------------------------------------------------------
|
|
| 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
| >
| > --
| > Charles Hagenbuch, <chuck at horde.org>
| > The alligators were there, too, in a bathtub inside the house.
| >
| > --
| > Horde developers mailing list
| > Frequently Asked Questions: http://horde.org/faq/
| > To unsubscribe, mail: dev-unsubscribe at lists.horde.org
| >
| >
|
|
|
| --
| Horde developers mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: dev-unsubscribe at lists.horde.org
|





More information about the dev mailing list