Get the Artisan application instance.

@return \Illuminate\Console\Application
182838
protected function getArtisan()
    {
        if (is_null($this->artisan)) {
            return $this->artisan = (new NewUpApplication($this->app, $this->events))
                ->resolveCommands($this->getCommands());
        }

        return $this->artisan;
    }
1051925
public function getInstance()
    {
        if (isset($this->classInstance)) {
            return $this->classInstance;
        }
        $this->classInstance = $this->jobFactory->create($this->payload['class'], $this->getArguments(), $this->queue);
        $this->classInstance->job = $this;
        return $this->classInstance;
    }
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;
    }
861353
private function getProvider()
    {
        if (version_compare(\Illuminate\Foundation\Application::VERSION, '5.0', '<')) {
            $provider = 'Larabookir\Gateway\GatewayServiceProviderLaravel4';
        } else {
            $provider = 'Larabookir\Gateway\GatewayServiceProviderLaravel5';
        }

        return new $provider($this->app);
    }
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;
    }
699212
public function instance()
	{
		try
		{
			$editor = App::get('editor');
		}
		catch (Exception $e)
		{
			$editor = \Hubzero\Html\Editor::getInstance('none');
		}

		return $editor;
	}
1369641
static public function getInstance(){
		if (!isset(self::$_instance)) {
			if (!sfConfig::get('app_amg_sentry_dsn')) {
				throw new Exception('Please configure amgSentryPlugin in your app.yml (use model in "amgSentryPlugin/config/app.yml")');
			}
			self::$_instance = new amgSentry(sfConfig::get('app_amg_sentry_dsn'), array('release' => sfConfig::get('app_amg_sentry_release')));
		}
		return self::$_instance;
	}
496582
public function getApplication()
    {
        if (file_exists('bootstrap/autoload.php')) {
            require_once 'bootstrap/autoload.php';
        } elseif (file_exists('vendor/autoload.php')) {
            require_once 'vendor/autoload.php';
        }

        // Laravel 5 / Lumen
        $isLaravel = true;
        if (file_exists('bootstrap/app.php')) {
            $this->app = require_once 'bootstrap/app.php';
            if (substr($this->app->version(), 0, 5) === 'Lumen') {
                $isLaravel = false;
            }
        }

        // Laravel 4
        if (file_exists('bootstrap/start.php')) {
            $this->app = require_once 'bootstrap/start.php';
            $this->app->boot();

            return $this->app;
        }

        if (!$this->app) {
            throw new \RuntimeException('Laravel bootstrap file not found');
        }

        $kernel = $this->app->make($isLaravel ? 'Illuminate\Contracts\Http\Kernel' : 'Laravel\Lumen\Application');

        $this->app->afterResolving('auth', function ($auth) {
            $auth->extend('session', function ($app, $name, $config) {
                $provider = $app['auth']->createUserProvider($config['provider']);
                $guard = new \PHPPM\Laravel\SessionGuard($name, $provider, $app['session.store'], null, $app);
                if (method_exists($guard, 'setCookieJar')) {
                    $guard->setCookieJar($this->app['cookie']);
                }
                if (method_exists($guard, 'setDispatcher')) {
                    $guard->setDispatcher($this->app['events']);
                }
                if (method_exists($guard, 'setRequest')) {
                    $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));
                }

                return $guard;
            });
        });

        $app = $this->app;
        $this->app->extend('session.store', function () use ($app) {
            $manager = $app['session'];
            return $manager->driver();
        });

        return $kernel;
    }
607114
public static function getInstance()
    {
        if (self::$instance == false) {
            self::$config = autoload_config();

            ini_set('session.cookie_httponly', self::$config['app']['SESSION_COOKIE_HTTPONLY']);

            self::$instance = self::generateToken();

            @session_name(self::$instance);
            @session_cache_expire(self::$config['app']['SESSION_EXPIRE']);
            @session_start();

            self::set('s_token', self::$instance);
        }

        return self::$instance;
    }
1075606
public function getApiClient()
    {
        if (!$this->_apiClient) {
            $this->_apiClient = new OAuth2([
                'clientId' => $this->clientID,
                'clientSecret' => $this->clientSecret,
                'cacheComponent' => $this->cacheComponent,
            ]);
        }
        return $this->_apiClient;
    }
1184115
public function getApplication()
    {
        if (!($this->_io instanceof IOInterface)) {
            throw new \RuntimeException('Bootstrapper instance requires IOInterface instance. Please call setIO() first.');
        }

        if (!$this->_bootstrapped) {
            $this->_bootstrap();
        }

        if (!($this->_application instanceof Application))
        {
            $options = array(
                'root_user' => $this->_credentials['username'],
                'loglevel'  => $this->_verbosity,
                'platform'  => Util::isJoomlatoolsPlatform()
            );

            try
            {
                $this->_application = new Application($options);
                $this->_application->authenticate($this->_credentials);
            }
            catch (\Exception $ex)
            {
                $this->_io->write("<error>Failed to initialize the Joomla application</error>");

                if ($this->_io->isVerbose()) {
                    $this->_io->write($ex->getMessage());
                }

                if ($this->_io->isDebug()) {
                    throw $ex;
                }

                $this->_application = false;
            }
        }

        return $this->_application;
    }
643538
public function getApplications()
    {
        $uri = 'applications';
        $response = $this->client->getEndpoint()->get($uri);

        $applications = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $application) {
            $applications[] = new Application($this->client, $application);
        }

        return $applications;
    }
583950
public function controller()
	{
		if(!$this->hasController()) {
			throw new InvalidControllerException('Could get controller of ' . get_class($this) . '. Please fill $controller property.');
		}

		return app()->make($this->controller);
	}
136514
protected function getArtisan()
    {
        if (is_null($this->artisan)) {
            return $this->artisan = (new Artisan($this->app, $this->events, $this->app->version()))
                                ->resolveCommands($this->commands);
        }

        return $this->artisan;
    }
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();
        });
    }
444859
protected function getServiceByFactory() {
		if ($this->arguments === null) {
			return $this->initService();
		}

		$args = $this->normalizeArgs($this->arguments);
		$args = $this->processArgs($args);
		
		return $this->initService($args);
	}
588884
public function getModel()
    {
        // Use explicilty set model
        if ($this->model) {
            return $this->model;
        }

        // Get the model instance that was passed to Former by the Base Controller
        $model = app('former.populator')->all();

        // Make sure it's a model instance
        if (is_a($model, 'Illuminate\Database\Eloquent\Model')) {
            return $model;
        }
    }