public static function start($application)
{
self::$_application = $application;
self::$_starting = true;
self::$_started = false;
$application->start();
self::$_starting = false;
self::$_started = true;
self::$_autostart = null;
// callback to clean up on process shutdown
if (!self::$_shutdownRegistered) {
register_shutdown_function(array(__CLASS__, 'shutdown'));
self::$_shutdownRegistered = true;
}
}