Writing Waiter Extensions

The Waiter provides a simple extensions framework in the form of:

  • A WaiterExtension class that you can extend to create your extensions

  • A set of hooks that the Waiter calls at various points during the handling of a request

To implement an extension you create a class based on WaiterExtension that listens for one or more hooks, and takes appropriate action when the hooks are called. The hooks are all called in sequence at specified points during a request, and the Waiter passes a hook object to the extension. The hook object is an array. Each hook can add items of information to the hook object, so that the total amount of information available increases as the request progresses. An extension can also add information to the hook object, or modify existing information in the object.

Waiter extensions must belong to the namespace Extensions.

In order to be found by the Waiter, an extension must be placed in your CUE Front installation's service/waiter/waiter-extensions/Extensions folder.