當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。