當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::isInstalled方法代碼示例

本文整理匯總了PHP中Illuminate\Contracts\Foundation\Application::isInstalled方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::isInstalled方法的具體用法?PHP Application::isInstalled怎麽用?PHP Application::isInstalled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Contracts\Foundation\Application的用法示例。


在下文中一共展示了Application::isInstalled方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: set

 /**
  * @param $key
  * @param $value
  * @return bool
  */
 public function set($key, $value)
 {
     $setting = Setting::whereKey($key)->first();
     if (!is_object($setting)) {
         $setting = new Setting();
         $setting->key = $key;
     }
     $setting->value = $value;
     $setting->save();
     if ($this->application->isInstalled()) {
         $this->cache->forget($this->cache_key);
     }
     return true;
 }
開發者ID:darrengopower,項目名稱:framework,代碼行數:19,代碼來源:Factory.php

示例2: bootstrap

 /**
  * Bootstrap the given application.
  *
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $application
  *
  * @return void
  */
 public function bootstrap(Application $application)
 {
     if ($application->isInstalled()) {
         if ($application->routesAreCached()) {
             $application->booted(function () use($application) {
                 require $application->getCachedRoutesPath();
             });
         } else {
             $application->make('events')->fire(new RouteRegister($application, $application['router']));
             $application->booted(function () use($application) {
                 $application['router']->getRoutes()->refreshNameLookups();
             });
         }
     }
 }
開發者ID:notadd,項目名稱:framework,代碼行數:22,代碼來源:RegisterRouter.php

示例3: bootstrap

 /**
  * Bootstrap the given application.
  *
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $application
  *
  * @return void
  */
 public function bootstrap(Application $application)
 {
     if ($application->isInstalled()) {
         $config = $application->make(ConfigRepository::class);
         $setting = $application->make(SettingsRepository::class);
         date_default_timezone_set($setting->get('setting.timezone', $config['app.timezone']));
         $config->set('app.debug', $setting->get('setting.debug', true));
         $config->set('mail.driver', $setting->get('mail.driver', 'smtp'));
         $config->set('mail.host', $setting->get('mail.host'));
         $config->set('mail.port', $setting->get('mail.port'));
         $config->set('mail.from.address', $setting->get('mail.from'));
         $config->set('mail.from.name', $setting->get('site.title', 'Notadd'));
         $config->set('mail.encryption', $setting->get('mail.encryption'));
         $config->set('mail.username', $setting->get('mail.username'));
         $config->set('mail.password', $setting->get('mail.password'));
     }
 }
開發者ID:notadd,項目名稱:framework,代碼行數:24,代碼來源:LoadSetting.php


注:本文中的Illuminate\Contracts\Foundation\Application::isInstalled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。