def wsgi_extend(self, controller):
        """
        Extends a controller by registering another controller as an
        extension of it.  All actions defined on the extension
        controller have routes generated for them (only if none
        already exist) and are made actions of this controller; all
        extensions defined on the extension controller are added to
        the extensions registered on this controller.
        """

        # Add/override actions
        for key, action in controller.wsgi_actions.items():
            # If it's a new action, we'll need to route
            if self.wsgi_mapper and key not in self.wsgi_actions:
                self._route(key, action)

            self.wsgi_actions[key] = action

            # Clear existing action descriptors
            self.wsgi_descriptors.pop(key, None)

        # Register extensions
        for key, extensions in controller.wsgi_extensions.items():
            # Skip empty extension lists
            if not extensions:
                continue

            # Prime the pump...
            self.wsgi_extensions.setdefault(key, [])

            # Add the extensions
            self.wsgi_extensions[key].extend(extensions)

            # Clear existing action descriptors
            self.wsgi_descriptors.pop(key, None)