You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignee: (none)
Status: Resolved (closed on 2015-12-21 09:35:04 +00:00)
Target Version: 2.1.1
Last Update: 2015-12-21 09:35:04 +00:00 (in Redmine)
As we cannot pass config to hook constructors I guess there is no way of "hooking" the same class twice in a meaningful way. Hooking multiple classes from the same module for the very same hook might however occur. There is no reason why we should force people to invent an immaginary key in that case. We should IMO discuss whether further improvements (pass the key to the constructor, allow for a way to defer loading of a specific config in an anonymous function) would make sense. What would then once again allow for registering the same class multiple times, as with different configs it might absolutely make sense.
Updated by elippmann on 2015-12-18 09:20:14 +00:00
Subject changed from Icinga\Web\Hook: module name is not a good choice for the default "key" to Deprecate Module::registerHook() in favor of Hook::provideHook()
This issue has been migrated from Redmine: https://dev.icinga.com/issues/9685
Created by tgelf on 2015-07-21 09:15:57 +00:00
Assignee: (none)
Status: Resolved (closed on 2015-12-21 09:35:04 +00:00)
Target Version: 2.1.1
Last Update: 2015-12-21 09:35:04 +00:00 (in Redmine)
As we cannot pass config to hook constructors I guess there is no way of "hooking" the same class twice in a meaningful way. Hooking multiple classes from the same module for the very same hook might however occur. There is no reason why we should force people to invent an immaginary key in that case. We should IMO discuss whether further improvements (pass the key to the constructor, allow for a way to defer loading of a specific config in an anonymous function) would make sense. What would then once again allow for registering the same class multiple times, as with different configs it might absolutely make sense.
Cheers,
Thomas
Changesets
2015-11-12 17:33:51 +00:00 by tgelf 6d186aa
2015-11-13 11:45:41 +00:00 by tgelf 3306a41
2015-11-13 16:37:02 +00:00 by tgelf 54db2c9
2015-12-21 09:30:40 +00:00 by elippmann 8835552
2015-12-21 09:31:12 +00:00 by elippmann f2d54af
Relations:
The text was updated successfully, but these errors were encountered: