def add_hook(self, name, func):
        if name in self.__hook_reversed:
            self._hooks[name].insert(0, func)
        else:
            self._hooks[name].append(func)
Attach a callback to a hook. Three hooks are currently implemented:
dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/Bottle.add_hook