[dev] Re: [cvs] commit: horde/config conf.xml hooks.php.dist framework/Share Share.php

Stuart K Bingë omicron-list at mighty.co.za
Mon Oct 4 09:30:18 PDT 2004


On Monday, 04 October 2004 17:52, Chuck Hagenbuch wrote:
> Quoting Stuart Binge <omicron-list at mighty.co.za>:
> >   Log:
> >   First shot at implementing hooks for share init, add, modify,
> > remove and list events
>
> 1. You should use Horde::callHook() to take care of most of the checking
> logic here.

Ah, right. I just took the first hook example I could find in IMP and copied 
that when implementing these (looks like there are several other places that 
need upgrading to Horde::callHook() then?).

> 2. I'd prefer it if these were called if the hook function is defined,
> instead of having configuration options for all possible hooks; if we
> instrument as many things as we might, that could get very messy. Does
> anyone else have an opinion on this?

I'd actually prefer this method as well. Although, wouldn't you need to 
include hooks.php before testing for the function existence? Something like:

include_once HORDE_BASE . '/config/hooks.php';
if (function_exists('_horde_hook_share_add')) {
 Horde::callHook('_horde_hook_share_add', ...);
}

Or is there some other place that these could (or should) be defined that gets 
seen before Share.php?

-- 
Stuart K Bingë
 - Freelance UNIX/C++, PHP, Perl developer.

Email: omicron at mighty.co.za



More information about the dev mailing list