get web app
@return \Wslim\Web\App
514275
static public function web()
	{
	    $key = 'app.web';
	    if (!static::has($key)) {
	        if ( !($app = static::app()) || $app->isCli()) {
	            static::setShared($key, new \Wslim\Web\App(Config::getWebAppPath()));
	        } else {
	            static::setShared($key, $app);
	        }
	    }
	    
	    return static::get($key);
	}
433530
protected function getFreshApplication()
    {
        return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) {
            $app->make(ConsoleKernelContract::class)->bootstrap();
        });
    }
593114
public function getController()
    {

        $class = overrideable_core_class('Core\\Antispam\\'
            . camelcase($this->saslHandle) . 'Controller', DIRNAME_CLASSES . '/Antispam/'
            . camelcase($this->saslHandle) . 'Controller.php',
            $this->getPackageHandle()
        );
        $app = Facade::getFacadeApplication();
        $cl = $app->make($class);
        return $cl;
    }
458579
protected function getSoap()
    {
        if ($this->SOAPClient === null) {
            $this->SOAPClient = new \SoapClient($this->url,
                [
                    'trace' => 1,
                    'cache_wsdl' => WSDL_CACHE_NONE
                ]);
            if ($this->location) {
                $this->SOAPClient->__setLocation($this->location);
            }
        }
        return $this->SOAPClient;
    }
1125481
public function getPrograms()
    {
        $url = $this->getApiEndpoint() . self::REST_PROGRAM;
        $this->setUrl($url)
            ->setVerb('GET');

        $response = $this->execute();

        if (isset($response->message)) {
            $message = 'Get programs : ' . $response->message;
            $this->helper->debug('getPrograms', [$message]);
        }

        return $response;
    }
1128839
public function getHttpClient()
    {
        if (!$this->_service) {
            $this->_service = new Zend_Gdata_App();
        }
        $client = $this->_service->getHttpClient();
        return $client;
    }
45638
static public function getApps() {
    static $applications = array();

    if (!empty($applications)) {
      return $applications;
    }

    $appsDir = APP_ROOT_DIR . '/Application';
    $content = scandir($appsDir);

    foreach ($content as $item) {
      if (is_dir($appsDir . '/' . $item) && $item != '.' && $item != '..') {
        $application = array();
        $application['name'] = $item;
        $application['path'] = $appsDir . '/' . $item;
        $applications[$item] = $application;
      }
    }

    $application = array();
    $application['name'] = basename(APP_FW_DIR);
    $application['path'] = APP_FW_DIR;
    $applications['Towel'] = $application;

    return $applications;
  }
462899
public function api()
    {
        if (is_null($this->api)) {
            $this->api = app(Api::class);
        }

        return $this->api;
    }
1331103
public function getLoader()
	{
		if ($this->loader === null) {
			$this->loader = new Dwoo_Loader($this->getCompileDir());
		}

		return $this->loader;
	}
860664
public function getApp(): App
    {
        if (!is_null($this->getTemplateEngine()->getApp())) {
            return $this->getTemplateEngine()->getApp();
        } else {
            throw new RuntimeException('Template engine is not initialized with application');
        }
    }
1203125
protected function _buildApp()
    {
        $namespaces = '';
        foreach ($this->_namespaces as $namespace => $d) {
            $namespaces .= "\nuse $namespace;";
        }

        $namespaces .= "\n";

        return $this->getContainer()->get('templating')->render('CmsBaseBundle::app.html.twig', array(
        'namespaces' => $namespaces,
        'conststants' => $this->_constans,
        'properties' => $this->_properties,
        'methods' => $this->_methods,
      ));
    }
1373812
public function getService() {
        $service = $this->get('service', $this->get('s', 'App.Site.Index'));

        if (count(explode('.', $service)) == 2) {
            $service = 'App.' . $service;
        }

        return $service;
    }
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;
    }
832217
public function get()
    {
        $permalink = $this->getView()->getParam('this.permalink', null);

        if ($permalink === null) {
            return rtrim($this->getView()->getOutputDir(), '/')
                . '/'
                . ltrim($this->getRelativeFile('entries', false), '/') . '.html';
        }

        $class = 'Phrozn\\Site\\View\\OutputPath\\Entry\\' . ucfirst($permalink);
        if (!class_exists($class)) {
            $class = 'Phrozn\\Site\\View\\OutputPath\\Entry\\Parametrized';
        }

        $object = new $class($this->getView());
        return $object->get();
    }
781392
public function getApp()
	{
		if(! self::$_app instanceof Application){
			self::$_app = new Application(Yii::$app->params['WECHAT']);
		}
		return self::$_app;
	}
707521
public function app($app)
    {
        $this->classRoute = Router::$defaultNameSpace . $app;
        
        $request = Router::$requestDriver;
        if (!empty($request)) {
            if (!$request->query->get("q")) {
                $request->query->set("q", "/");
            }
        } else {
            $_GET['q'] = "/";
        }
        
        if ($this->method === "ALL" ||
            ((!empty($request) && $this->method === $request->server->get("REQUEST_METHOD")) ||
                $_SERVER['REQUEST_METHOD'] === $this->method)
        ) {
            $this->useRoute($this->route);
        } else {
            $this->classRoute = false;
        }
        
        return new RouteMiddleware($this->route, $this->classRoute, $this->methodRoute);
    }
583828
static public function cli()
	{
	    $key = 'app.cli';
	    
	    if (!static::has($key)) {
	        if ( !($app = static::app()) || !$app->isCli()) {
	            static::setShared($key, new \Wslim\Console\App(Config::getCliAppPath()));
	        }
	    }
	    
	    return static::get($key);
	}