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