Get a fresh application instance.

@return \Illuminate\Foundation\Application
6265
protected function getFreshApplication()
    {
        return tap(require app(\Antares\Foundation\Application::class)->bootstrapPath() . '/app.php', function ($app) {
            $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
        });
    }
433530
protected function getFreshApplication()
    {
        return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) {
            $app->make(ConsoleKernelContract::class)->bootstrap();
        });
    }
857732
public function initialize()
    {
        // Create the application object
        $app = new Application;

        $this->setEnvironment($app);
        $this->registerConfig($app);

        // Handle init config
        $initConfig = $app['config']->load('init');

        if ($initConfig['debug']) {
            Debug::enable();
            $app['debug'] = true;
        }

        return $app;
    }
940431
public function refreshApplication($app = null)
    {
        $this->app = $app instanceof Application ? $app : $this->createApplication();
    }
848147
public static function getInstance(): Application
    {
        if (self::$instance === null) {
            $calledClass = get_called_class(); //Autorize extends this class
            self::$instance = new $calledClass;
        }

        return self::$instance;
    }
118416
public function getApplication() {
		if (!is_null($this->session)) {
			return $this->session->getApplication();
		} else {
			return $this->context->getSystem()->getApplication();
		}
	}
271593
public function create()
    {
        if ($this->reflectionService !== null) {
            return $this->reflectionService;
        }

        $cacheManager = $this->bootstrap->getEarlyInstance(CacheManager::class);
        $configurationManager = $this->bootstrap->getEarlyInstance(ConfigurationManager::class);
        $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');

        $reflectionService = new ReflectionService();
        $reflectionService->injectLogger($this->bootstrap->getEarlyInstance(PsrLoggerFactoryInterface::class)->get('systemLogger'));
        $reflectionService->injectSettings($settings);
        $reflectionService->injectPackageManager($this->bootstrap->getEarlyInstance(PackageManager::class));
        $reflectionService->setStatusCache($cacheManager->getCache('Flow_Reflection_Status'));
        $reflectionService->setReflectionDataCompiletimeCache($cacheManager->getCache('Flow_Reflection_CompiletimeData'));
        $reflectionService->setReflectionDataRuntimeCache($cacheManager->getCache('Flow_Reflection_RuntimeData'));
        $reflectionService->setClassSchemataRuntimeCache($cacheManager->getCache('Flow_Reflection_RuntimeClassSchemata'));
        $reflectionService->injectEnvironment($this->bootstrap->getEarlyInstance(Environment::class));

        $this->reflectionService = $reflectionService;
        return $reflectionService;
    }
58954
public static function instance()
    {
        if (null === self::$_instance) {
            $logger = new Monolog(Config::read('app.id'));
            $file_handler = new StreamHandler(self::getFilepath());
            $logger->pushHandler($file_handler);

            self::$_instance = $logger;
        }
        return self::$_instance;
    }
200465
public function load()
    {
        $this->loadChildClasses();

        list($constructorResolvedOptions, $extraResolvedOptions) = $this->resolveOptions();
        $instance = $this->reflected->newInstanceArgs($constructorResolvedOptions);

        $this->loadExtraOptions($extraResolvedOptions, $instance);

        return $instance;
    }
261739
protected function getApplications() {
        if (!$this->_applications) {
            $this->_applications = new ApplicationList($this->version, $this->solution['sid']);
        }

        return $this->_applications;
    }
181150
public static function getApplicationUpdateInformation()
    {
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache');
        $r = $cache->getItem('APP_UPDATE_INFO');
        if ($r->isMiss()) {
            $r->lock();
            $result = static::getLatestAvailableUpdate();
            $r->set($result)->save();
        } else {
            $result = $r->get();
        }

        return $result;
    }
134181
public function refresh() {

		clearstatcache();

		$file = new File($this -> file -> getBasepath());
		$this -> file = $file -> entity();

		return $this;
	}
918987
final public static function getInstance() {
	
		if (NULL == self::$instance) {
			self::$instance = new self();
			self::$instance->startChrono();
		}
		
		return self::$instance;
	
	}
167785
public function createApplication()
    {
        $app = $this->resolveApplication();

        $this->resolveApplicationBindings($app);
        $this->resolveApplicationExceptionHandler($app);
        $this->resolveApplicationCore($app);
        $this->resolveApplicationConfiguration($app);
        $this->resolveApplicationHttpKernel($app);
        $this->resolveApplicationConsoleKernel($app);
        $this->resolveApplicationBootstrappers($app);

        return $app;
    }
698809
public static function application()
	{
		if(!isset(self::$_application))
		{
			if(!empty(self::$_autostart))
			{
				self::start(self::$_autostart);
			}
			else
			{
				throw new Exception('No application initialized');
			}
		}

		return self::$_application;
	}
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
481710
private function loadApplication()
    {
        $app = require $this->module->config['bootstrap_file'];
        $app->loadEnvironmentFrom($this->module->config['environment_file']);
        $app->instance('request', new Request());

        return $app;
    }