当前位置: 首页>>代码示例>>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;未经允许,请勿转载。