Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Have clear definition for notifications vs hooks #148

Open
adam-buckley opened this issue Jul 3, 2015 · 1 comment
Open

Have clear definition for notifications vs hooks #148

adam-buckley opened this issue Jul 3, 2015 · 1 comment

Comments

@adam-buckley
Copy link
Contributor

We have a scenario in auth where it uses two hooks, the first, it cares about what implementing modules to with the data, i.e. the modules return a value that influences outcomes. The second hook, auth doesn't care what the implementing modules to with the data, it is merely a notification.

Things brings in some confusing aspects as to if a hook will return data or not.

We can clear this up by introducing an overlapping function in Web called notify which calls Web::callHooks but does nothing with the returning data. With notify, we could also rewrite errors to logs but surround with try/catch to try and avoid halts in execution... what to you think @careck?

@careck
Copy link
Member

careck commented Jul 6, 2015

I like this idea, can we call the new function ::notifyHook() please.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants