Creating Custom Event Handlers

Event handlers allow you to react to different EPP-DRS internal events.
For example, you can execute your own PHP code when new client is created or before domain is created or when new invoice is issued.

Essentials

To create your own event handler, create a class and place it in events folder.

The class must:

  • implement IConfigurable interface and
  • implement one of the following interfaces: IRegistryObserver, IPaymentObserver, IInvoiceObserver, IGlobalObserver

Once it fits these requirements, it will be recognized by the system and appear in Settings » Integration and customization » Custom event handlers in admin area.

IConfigurable

IConfigurable interface contains a single method that you must implement: public static function GetConfigurationForm() It must return DataForm object. EPP-DRS will call this method when you click on Configure link and present you with the HTML form that you have constructed.

If your event handler class needs no configuration, you may simply return new DataForm();

See API Reference for more info.

Inside events folder You can find a sample event handlers that simply call specific URLs on each event.

 
event.handlers.txt · Last modified: 2008/05/27 12:13 (external edit)