Recently, support for three new component callback methods has been added: beforeRender, beforeRedirect, and shutdown. (Correction: those callbacks have been around for quite a while, see Nate’s comment, but I noticed them only recently)

As its name implies, the beforeRender() callback method is called before the view is rendered, but after the beforeRender() callback method of the controller:

// in your component
public function beforeRender($controller) {
    // do something
}

The beforeRedirect() callback is also quite obvious, it gets called before a redirect is performed:

// in your component
public function beforeRedirect($controller, $url, $status = null, $exit = true) {
    // do something
}

By providing a return value, you can override the values with which the redirect method was originally called. For example:

public function beforeRedirect($controller, $url, $status = null, $exit = true) {
    // return '/redirect/target';  // a single value is treated as an URL
    return array('url' => '/redirect/target', 'status' => 307);
}

The last callback method, shutdown(), is called after Controller::render() and before Controller::afterFilter():

// in your component
public function shutdown($controller) {
    // do something
}

Those callback methods are probably a “nice to have” feature, at least I didn’t miss them up to now.

Anyway, happy baking!