Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个小插件:
Authentication
onUserAuthenticate
System
onAfterRoute
作为 2 个插件,我需要安装 2 个 zip 文件。是否可以使用registerEvent函数 create 1 插件?
registerEvent
嗯......我认为你应该保留两个不同的插件。
事实上,你可以调用另一个插件,但是如果用户只安装了一个而不是另一个呢? 此外,您可以触发一个event,而不是单个插件。 这意味着您将触发链接到该事件的所有插件,而不仅仅是您的。
event
恕我直言,您应该使用两个插件,否则您可能会遇到一些错误,这将是调试的噩梦。