'Registers controller extensions with this resource.'

def register_extensions(self, controller):

    extensions = getattr(controller, 'wsgi_extensions', [])
    for (method_name, action_name) in extensions:
        extension = getattr(controller, method_name)
        if action_name:
            if (action_name not in self.wsgi_action_extensions):
                self.wsgi_action_extensions[action_name] = []
            self.wsgi_action_extensions[action_name].append(extension)
        else:
            if (method_name not in self.wsgi_extensions):
                self.wsgi_extensions[method_name] = []
            self.wsgi_extensions[method_name].append(extension)
