onApplicationStart(): run once when an application starts, before the first request. It can
access that request’s variables and write output to its response.
onApplicationEnd(): run when an application is explicitly shut down. This is not associated
with any request.
onSessionStart(): run when session handling is enabled and a new session starts. Associated
with request.
onSessionEnd(): run when a session times out or is cancelled. Not associated with request.
onRequestStart(): called before every request. Associated with request.
onRequest(): called after onRequestStart code ends. Associated with request.
onRequestEnd(): called after request has been processed. Associated with request.
onMissingTemplate(): called when an unknown page has been requested. Associated with
request.
onError(): called when an uncaught exception occurs. This may or may not be associated with
a request.