Get an instance of the app

@return AppInterface
978771
protected function getPayloadInstance(): AppInterface {
        if (!($this->instance instanceof AppInterface)) {
            $appName = $this->get('appname', null);
            $appNamespace = $this->get('appnamespace', null);

            // Run App
            $appClassName = ucfirst($appName);
            if (!is_null($appNamespace)) {
                $appClassName = "\\{$appNamespace}\\{$appClassName}";
            }

            $this->instance = $this->di->get($appClassName);
        }
        return $this->instance;
    }
976056
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new FacebookMetaProperties();

			self::$instance->init( 'facebook-meta' );
		}

		return self::$instance;
	}
852730
public static function getInstance()
    {
        $sClass = get_called_class();

        if (!isset(self::$_aInstances[$sClass])) {
            self::$_aInstances[$sClass] = new $sClass();
        }

        return self::$_aInstances[$sClass];
    }
549300
public static function getInstance()
    {
        $controller = get_called_class();

        if (! isset(self::$instance[$controller])) {
            self::$instance[$controller] = new $controller;
        }

        if (is_null(self::$instance[$controller]->view)) {
            self::getViewInstance(self::$instance[$controller]);
        }

        self::getModelInstance(self::$instance[$controller], $controller);

        return self::$instance[$controller];
    }
621854
public function getApplication(): ?Application
    {
        if ($this instanceof Application) {
            return $this;
        }

        if ($p = $this->parent) {
            return $p->getApplication();
        }

        return null;
    }
1291169
public function &getInstance()
    {
        if (empty($this->instance)) {
            $className = $this->name;
            $this->instance = new $className();

            if (count($this->properties)) {
                foreach ($this->properties as $key => $value) {
                    $setterMethodName = camelcase('set_' . $key);

                    if (method_exists($this->instance, $setterMethodName)) {
                        $this->instance->{$setterMethodName}($value);
                    } else {
                        $this->instance->{$key} = $value;
                    }
                }
            }
        }

        return $this->instance;
    }
651054
public function getApplication()
    {
        if (!$this->app) {
            $this->app = $this->getPackage()->app ?: $this->container->get('application');
        }

        return $this->app;
    }
1297326
public static function getInstance()
    {
        if ( self::$instance === null ) {
            self::$instance = new Config( self::$file );
        }
        
        return self::$instance;
    }
210359
static public function instance() {
		$f3 = \Base::instance();
		$dir = $f3->split($f3->get('UI'));
		$localFS = new \FAL\LocalFS($dir[0]);
		return new self($localFS);
	}
1082731
public function get()
    {
        $schemeCollection = (new SchemeCollectionProvider($this->appName, $this->injector))->get();
        foreach ($this->importAppConfig as $importApp) {
            /* @var \BEAR\Resource\ImportApp */
            $injector = class_exists(AppInjector::class) ? new AppInjector($importApp->appName, $importApp->context) : $this->injector;
            $adapter = new AppAdapter($injector, $importApp->appName);
            $schemeCollection
                ->scheme('page')->host($importApp->host)->toAdapter($adapter)
                ->scheme('app')->host($importApp->host)->toAdapter($adapter);
        }

        return $schemeCollection;
    }
875931
public static function getInstance()
    {
        if (!self::$instance instanceof ClientInterface) {

            $serviceContainer = ServiceContainer::getInstance();

            self::$instance = new static(
                $serviceContainer->get('engine'),
                $serviceContainer->get('procedure_loader'),
                $serviceContainer->get('procedure_compiler'),
                $serviceContainer->get('message_factory')
            );
        }

        return self::$instance;
    }
581146
static public function getInstance( $configuration = array() )
    {
        if (empty( self::$instance )) {
            self::$instance = new App( $configuration );
        }
        return self::$instance;
    }
6656
public function instanceAllApps(): array
    {
        $allAppIds = $this->applicationConfig->getAllApplicationIds();

        return array_map(function (string $id) {
            return $this->instanceAppById($id);
        }, $allAppIds);
    }
316112
public static function getInstance()
    {
        $args = func_get_args();
        if (count($args) == 2)
        {
            $author = $args[0];
            $name = $args[1];
        }

        elseif (count($args) == 1)
        {
            list($author, $name) = explode('\\', $args[0]);
        }
        else
            throw  new \Exception();
        // check module is exist in host
        if (!self::checkOnDisk($author, $name))
            return null;
        if (!isset(self::$instance[$author . '*' . $name]))
        {
            // get class namespace
            $class = strval(\App::getNamespace() . 'Modules\\' . $author . '\\' . $name . '\\Module');
            $object = new $class;
            self::$instance[$author . '*' . $name] = $object;

            // get data from database

        }
        return self::$instance[$author . '*' . $name];
    }
958985
public static function instance()
    {
        if (null === self::$_instance) {
            if (!defined('APP_ROOT')) {
                $path = __DIR__ . '/../../app/config.json';
            } else {
                $path = APP_ROOT . 'config.json';
            }

            if (!file_exists($path)) {
                $config = json_encode(self::$defaults, JSON_PRETTY_PRINT);
                file_put_contents($path, $config);
            }
            self::$_instance = new static($path);
        }
        return self::$_instance;
    }
565328
public static function getInstance(): SessionInterface
    {
        if (static::$session instanceof SessionInterface) {
            return static::$session;
        }

        if (strlen(static::$name) < 1) {
            throw new \Exception("Cannot start session, no name has been specified, you must call Session::name() before using this class");
        }

        static::$session = new SessionInstance(static::$name);

        return static::$session;
    }
394984
protected function proxy() {
        if (!$this->context) {
            $this->context = new ApplicationContext(
                $this->version,
                $this->solution['accountSid'],
                $this->solution['sid']
            );
        }

        return $this->context;
    }