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