The function signature is:
call({args = [], handler, hooks = [], name})
Execute a hander function and its associated hooks. The first argument is an object with the properties:
args
(any) Argument pass to the handler function as well as all hook handlershandler
(function)
Function to decorate, receive the value assocaited with theargs
property.name
(string)
Name of the hook to execute.hooks
([hook])
List of completary hooks from the end user.
The function signature is:
get({name, hooks, sort})
The get
function return hooks. It expects a property option
which is a literal object with the properties:
name
(string)
Name of the hook to retrieve.hooks
([hook]) List of completary hooks from the end user.sort
(boolean)
Sort the hooks relatively to each other using theafter
andbefore
properties.
The function signature is:
register(plugin)
Plugin can be provided when instantiating Plug-And-Play by passing the plugins
property or they can be provided later on by calling the register
function. The function only accept one argument, the plugin
property:
plugin
(plugin)
Plugin object.
The function signature is:
registered(name)
Check if a plugin is registered.