当前位置: 首页>>代码示例>>PHP>>正文


PHP FileLocator::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\Config\FileLocator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FileLocator::__construct方法的具体用法?PHP FileLocator::__construct怎么用?PHP FileLocator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Config\FileLocator的用法示例。


在下文中一共展示了FileLocator::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor.
  *
  * @param KernelInterface $kernel A KernelInterface instance
  * @param string          $path   The path the global resource directory
  * @param string|array $paths A path or an array of paths where to look for resources
  */
 public function __construct(KernelInterface $kernel, $path = null, array $paths = array())
 {
     $this->kernel = $kernel;
     $this->path = $path;
     $paths[] = $path;
     parent::__construct($paths);
 }
开发者ID:hellovic,项目名称:symfony,代码行数:14,代码来源:FileLocator.php

示例2: __construct

 /**
  * Constructor
  *
  * By default, the locator looks for configuration file in the current directory (where bin/propel script is running)
  * or in a 'conf' or 'config' subdirectory.
  *
  * @param null array $configDirectories The directories list where to look for configuration file(s)
  */
 public function __construct($configDirectories = null)
 {
     if (null === $configDirectories) {
         $configDirectories = array(getcwd(), 'config', 'conf');
     }
     parent::__construct($configDirectories);
 }
开发者ID:bondarovich,项目名称:Propel2,代码行数:15,代码来源:FileLocator.php

示例3: __construct

 public function __construct(filesystem_interface $filesystem, $paths = [])
 {
     $paths = (array) $paths;
     $absolute_paths = [];
     foreach ($paths as $path) {
         $absolute_paths[] = $filesystem->realpath($path);
     }
     parent::__construct($absolute_paths);
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:9,代码来源:file_locator.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param KernelInterface $kernel       A KernelInterface instance
  * @param ActiveTheme     $activeTheme  A ActiveTheme instance
  * @param string|null     $path         Path
  * @param array           $paths        Base paths
  * @param array           $pathPatterns Fallback paths pattern
  */
 public function __construct(KernelInterface $kernel, ActiveTheme $activeTheme, $path = null, array $paths = array(), array $pathPatterns = array())
 {
     $this->kernel = $kernel;
     $this->activeTheme = $activeTheme;
     $this->path = $path;
     $this->basePaths = $paths;
     $defaultPathPatterns = array('app_resource' => array('%app_path%/themes/%current_theme%/%template%', '%app_path%/views/%template%'), 'bundle_resource' => array('%bundle_path%/Resources/themes/%current_theme%/%template%'), 'bundle_resource_dir' => array('%dir%/themes/%current_theme%/%bundle_name%/%template%', '%dir%/%bundle_name%/%override_path%'));
     $this->pathPatterns = array_merge_recursive(array_filter($pathPatterns), $defaultPathPatterns);
     $this->lastTheme = $this->activeTheme->getName();
     parent::__construct(array());
 }
开发者ID:xabbuh,项目名称:LiipThemeBundle,代码行数:20,代码来源:FileLocator.php

示例5: __construct

 public function __construct(KernelInterface $kernel, $path = null, array $paths = array())
 {
     $this->kernel = $kernel;
     if (null !== $path) {
         $this->path = $path;
         $paths[] = $path;
     }
     try {
         $theme = $this->getSettingService()->get('theme', array());
     } catch (\Exception $e) {
         $theme = array();
     }
     if (!empty($theme['uri'])) {
         $themePath = $this->kernel->getRootDir() . '/../web/themes/' . $theme['uri'];
         if (is_dir($themePath)) {
             $this->themePath = $themePath;
         }
     }
     $paths[] = $this->themePath;
     parent::__construct($paths);
 }
开发者ID:liugang19890719,项目名称:www.zesow.com,代码行数:21,代码来源:FileLocator.php

示例6: __construct

 /**
  * Method construct that accepts an arrays of dirs paths.
  * 
  * @param array $dirs
  */
 public function __construct(array $dirs = array())
 {
     parent::__construct($dirs);
 }
开发者ID:websublime,项目名称:config,代码行数:9,代码来源:ConfigLocator.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param KernelInterface $kernel A KernelInterface instance
  * @param string|array    $paths  A path or an array of paths where to look for resources
  */
 public function __construct(KernelInterface $kernel, array $paths = array())
 {
     $this->kernel = $kernel;
     parent::__construct($paths);
 }
开发者ID:noelg,项目名称:symfony-demo,代码行数:11,代码来源:FileLocator.php

示例8: __construct

 public function __construct(array $paths, array $bundles)
 {
     $this->bundles = $bundles;
     parent::__construct($paths);
 }
开发者ID:rouffj,项目名称:rouffj-test,代码行数:5,代码来源:RoutingTest.php

示例9: __construct

 /**
  * Constructor
  *
  * @param KernelInterface $kernel
  */
 public function __construct(KernelInterface $kernel)
 {
     $this->kernel = $kernel;
     parent::__construct([]);
 }
开发者ID:makinacorpus,项目名称:drupal-sf-dic,代码行数:10,代码来源:FileLocator.php

示例10: __construct

 /**
  * FileLocator constructor.
  *
  * @param ThemeLocatorInterface $themeLocator
  * @param array                 $paths
  */
 public function __construct(ThemeLocatorInterface $themeLocator, array $paths = [])
 {
     parent::__construct($paths);
     $this->themeLocator = $themeLocator;
 }
开发者ID:wellcommerce,项目名称:wellcommerce,代码行数:11,代码来源:FileLocator.php


注:本文中的Symfony\Component\Config\FileLocator::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。