/** * Creates application object and registers it at static variable. * * @param string $class Application class name * * @return Application */ public static function createApplication($class = '\\Tygh\\Application') { self::$app = new $class(); Registry::setAppInstance(self::$app); return self::$app; }