-
Notifications
You must be signed in to change notification settings - Fork 17
Hooks
SimpleID uses "hooks" to interact with extensions.
A hook is a PHP function which follows particular conventions. These are:
- The name of a function is always in the form of
extension_hook()
, whereextension
is the name of the extension (thus with the file nameextension.extension.php
) andhook
is the name of the hook. - Each hook has a defined set of parameters and a specified result type.
Thus to extend SimpleID, an extension has to implement one or more hooks. When required, SimpleID determines which extensions implement a hook and call that hook in all enabled extensions that implement it.
A list of hooks available can be found in /extensions/hooks.php. This page lists all the hooks for a generic extension with the name hook
. For example, hook_checkid
describes the checkid
hook, which can be implemented by an extension with the name example
using the example_checkid
function.
The documentation in this wiki is targeted for developers. For information on how to use SimpleID, please see the SimpleID user documentation.