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


PHP Application::configPath方法代碼示例

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


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

示例1: getConfigurationFiles

 /**
  * Get all of the configuration files for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @return array
  */
 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     foreach (Finder::create()->files()->name('*.php')->in($app->configPath()) as $file) {
         $files[basename($file->getRealPath(), '.php')] = $file->getRealPath();
     }
     return $files;
 }
開發者ID:fparralejo,項目名稱:btrabajo,代碼行數:14,代碼來源:LoadConfiguration.php

示例2: getConfigurationFiles

 protected function getConfigurationFiles(Application $app)
 {
     $configPath = str_finish($app->configPath(), '/');
     $files = $this->getConfigurationFilesInPath($configPath);
     foreach (explode('.', $app->environment()) as $env) {
         $configPath .= $env . '/';
         $files = array_merge_recursive($files, $this->getConfigurationFilesInPath($configPath));
     }
     return $files;
 }
開發者ID:KinaMarie,項目名稱:laravel-5-base-app-support,代碼行數:10,代碼來源:LoadConfiguration.php

示例3: getConfigurationFiles

 /**
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
  *
  * @return array
  */
 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     $configPath = realpath($app->configPath());
     foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {
         $nesting = $this->getConfigurationNesting($file, $configPath);
         $files[$nesting . basename($file->getRealPath(), '.php')] = $file->getRealPath();
     }
     return $files;
 }
開發者ID:notadd,項目名稱:framework,代碼行數:15,代碼來源:LoadConfiguration.php

示例4: getConfigurationFiles

 /**
  * Get all of the configuration files for the application.
  *
  * @param  Application $app
  *
  * @return array
  */
 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     foreach ($this->getAllowedFileExtensions() as $extension) {
         foreach (Finder::create()->files()->name('*.' . $extension)->in($app->configPath()) as $file) {
             $nesting = $this->getConfigurationNesting($file, config_path());
             $files[$nesting . basename($file->getRealPath(), '.' . $extension)] = $file->getRealPath();
         }
     }
     return $files;
 }
開發者ID:krom,項目名稱:laravel-yaml-configuration,代碼行數:18,代碼來源:LoadYamlConfiguration.php

示例5: loadConfigurationFiles

 /**
  * Load the configuration items from all of the files.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @param  \Illuminate\Contracts\Config\Repository  $repository
  * @return void
  */
 protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
 {
     $baseFiles = $this->getConfigurationFiles($app->baseConfigPath());
     $projFiles = !$app->isBaseProject() ? $this->getConfigurationFiles($app->configPath()) : [];
     $keys = array_unique(array_merge(array_keys($baseFiles), array_keys($projFiles)));
     foreach ($keys as $key) {
         $baseCfg = array_key_exists($key, $baseFiles) ? require $baseFiles[$key] : [];
         $projCfg = array_key_exists($key, $projFiles) ? require $projFiles[$key] : [];
         $repository->set($key, array_merge($baseCfg, $projCfg));
     }
 }
開發者ID:thirdgerb,項目名稱:commune-framework,代碼行數:18,代碼來源:LoadConfiguration.php

示例6: bootstrap

 public function bootstrap(Application $app)
 {
     $this->app = $app;
     $this->fs = new Filesystem();
     $paths = [$app->exportPath(), $app->homePath(), $app->storagePath(), $app->databasePath(), $app->publicPath(), $app->configPath()];
     foreach ($paths as $path) {
         $this->ensureDirectory($path);
     }
     $storagePaths = ['app', 'framework', 'framework/cache', 'framework/views', 'framework/sessions', 'logs', $app->getSlug()];
     foreach ($storagePaths as $path) {
         $this->ensureDirectory(path_join($app->storagePath(), $path));
     }
 }
開發者ID:laradic-old,項目名稱:illuminate,代碼行數:13,代碼來源:EnsureDirectories.php

示例7: getConfigurationFiles

 /**
  * Get all of the configuration files for the application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @return array
  */
 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     foreach (Finder::create()->files()->name('*.php')->in($app->configPath()) as $file) {
         $nesting = $this->getConfigurationNesting($file);
         $files[$nesting . basename($file->getPathname(), '.php')] = $file->getPathname();
     }
     // Verificar se tem um arquivo de configuracao na pasta do pchar
     $config_root = root_path('config.php');
     if (file_exists($config_root)) {
         $files['config'] = $config_root;
     }
     return $files;
 }
開發者ID:consolle,項目名稱:framework,代碼行數:20,代碼來源:LoadConfiguration.php

示例8: getConfigurationFiles

 protected function getConfigurationFiles(Application $app)
 {
     $files = [];
     $configPath = realpath($app->configPath());
     $ondemand = explode(",", env('CONF_ONDEMAND', ""));
     foreach (Finder::create()->files()->name('*.*')->in($configPath) as $file) {
         $nesting = $this->getConfigurationNesting($file, $configPath);
         $parts = explode('.', $file);
         $ext = array_pop($parts);
         $key = $nesting . basename($file->getRealPath(), '.' . $ext);
         if (in_array($key, $ondemand)) {
             continue;
         }
         $files[$key] = $file->getRealPath();
     }
     return $files;
 }
開發者ID:skvn,項目名稱:laraext,代碼行數:17,代碼來源:LoadConfiguration.php

示例9: bootstrap

 /**
  * Bootstrap the given application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @return void
  */
 public function bootstrap(Application $app)
 {
     $items = [];
     // First we will see if we have a cache configuration file. If we do, we'll load
     // the configuration items from that file so that it is very quick. Otherwise
     // we will need to spin through every configuration file and load them all.
     /*if (file_exists($cached = $app->getCachedConfigPath()))
     		{
     			$items = require $cached;
     
     			$loadedFromCache = true;
     		}*/
     $app->instance('config', $config = new IlluminatoRepository($items));
     // Next we will spin through all of the configuration files in the configuration
     // directory and load each one into the repository. This will make all of the
     // options available to the developer for use in various parts of this app.
     if (!isset($loadedFromCache)) {
         $this->loadConfigurationFiles($app->configPath(), $config);
     }
     date_default_timezone_set($config['app.timezone']);
     mb_internal_encoding('UTF-8');
 }
開發者ID:dedesite,項目名稱:illuminato,代碼行數:28,代碼來源:LoadConfiguration.php


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