Base class for an individual Component. Components provide reusable bits of controller logic that can be composed into a controller. Components also provide request life-cycle callbacks for injecting logic at specific points. ### Initialize hook Like Controller and Table, this class has an initialize() hook that you can use to add custom 'constructor' logic. It is important to remember that each request (and sub-request) will only make one instance of any given component. ### Life cycle callbacks Components can provide several callbacks that are fired at various stages of the request cycle. The available callbacks are: - `beforeFilter(IEvent event)` Called before Controller.beforeFilter() method by default. - `startup(IEvent event)` Called after Controller.beforeFilter() method, and before the controller action is called. - `beforeRender(IEvent event)` Called before Controller.beforeRender(), and before the view class is loaded. - `afterFilter(IEvent event)` Called after the action is complete and the view has been rendered but before Controller.afterFilter(). - `beforeRedirect(IEvent event url, Response response)` Called before a redirect is done. Allows you to change the URL that will be redirected to by returning a Response instance with new URL set using Response.location(). Redirection can be prevented by stopping the event propagation. While the controller is not an explicit argument for the callback methods it is the subject of each event and can be fetched using IEvent.getSubject().