本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
示例6: __construct
/**
* Method construct that accepts an arrays of dirs paths.
*
* @param array $dirs
*/
public function __construct(array $dirs = array())
{
parent::__construct($dirs);
}
示例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);
}
示例8: __construct
public function __construct(array $paths, array $bundles)
{
$this->bundles = $bundles;
parent::__construct($paths);
}
示例9: __construct
/**
* Constructor
*
* @param KernelInterface $kernel
*/
public function __construct(KernelInterface $kernel)
{
$this->kernel = $kernel;
parent::__construct([]);
}
示例10: __construct
/**
* FileLocator constructor.
*
* @param ThemeLocatorInterface $themeLocator
* @param array $paths
*/
public function __construct(ThemeLocatorInterface $themeLocator, array $paths = [])
{
parent::__construct($paths);
$this->themeLocator = $themeLocator;
}