View Single Post
  #1  
Old 2nd June 2013, 13:47
tom123 tom123 is offline
Member
 
Join Date: Feb 2012
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Default Plugin architecture

Hi,
i've seen that plugins are called by events. Each plugin will subscribe for an event and then called when this event is triggerd.

This is good, but how can I get a feedback from the plugin? Are plugin able to send back a response to the caller or the communication is just in one-way ISPConfig -> Plugin only ?

For example, what happens if some plugin actions doesn't work as expected ? How can I get this from ISPConfig ?

next question: modules announce some events and then each module will register itself for some database table changes. Each db change will trigger one or more event (announced by modules) that will call the plugin ?

For example:
- module web announce an event called "web_domain_insert"
- module web register for web_domain db table change. On each change it will trigger the "process" method inside itself
- module web process method will trigger an event "web_domain_insert"
- the event "web_domain_insert" is detected by plugin "apache2_plugin" that was listening for that event due to the method "onLoad"

In this way, each module is able to create custom events, trigger some events based on db changes and plugins are able to trigger some action due to the event registration, right?
Reply With Quote
Sponsored Links