Esempio n. 1
0
 /**
  * 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);
 }
Esempio n. 2
0
 /**
  * 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 /**
  * 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());
 }
 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);
 }
Esempio n. 6
0
 /**
  * Method construct that accepts an arrays of dirs paths.
  * 
  * @param array $dirs
  */
 public function __construct(array $dirs = array())
 {
     parent::__construct($dirs);
 }
Esempio n. 7
0
 /**
  * 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);
 }
Esempio n. 8
0
 public function __construct(array $paths, array $bundles)
 {
     $this->bundles = $bundles;
     parent::__construct($paths);
 }
Esempio n. 9
0
 /**
  * Constructor
  *
  * @param KernelInterface $kernel
  */
 public function __construct(KernelInterface $kernel)
 {
     $this->kernel = $kernel;
     parent::__construct([]);
 }
Esempio n. 10
0
 /**
  * FileLocator constructor.
  *
  * @param ThemeLocatorInterface $themeLocator
  * @param array                 $paths
  */
 public function __construct(ThemeLocatorInterface $themeLocator, array $paths = [])
 {
     parent::__construct($paths);
     $this->themeLocator = $themeLocator;
 }