[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 10:06:57 PDT 2004
On Monday, 04 October 2004 18:38, Chuck Hagenbuch wrote:
> > So, as far as I can tell, these new blocks can just be replaced by a
> > single Horde::callHook() call (or am I still missing something?).
>
> I believe so. Why doncha try it? :)
One problem with callHook() though - it returns a PEAR_Error if hooks.php or
the hook function doesn't exist.
I'd like to use PEAR_Error (as opposed to a boolean or something) as a return
value from the share hooks, so that if an operation fails a message to the
user can be displayed through the notification system. Regardless of the type
of the return value, I also want to have the corresponding share operation
exit early if the hook returns an error (e.g. if _horde_hook_share_add()
returns an error then the share won't be added to the share list).
What about adding another callHook()-like function to Horde::, say
callOptionalHook() or callHookIfAvailable(), that doesn't log nor return an
error if hooks.php or the hook function don't exist?
--
Stuart K Bingë
- Freelance UNIX/C++, PHP, Perl developer.
Email: omicron at mighty.co.za
More information about the dev
mailing list