public function __construct($paths = array(), $extension = null) { parent::__construct($paths); if (is_null($extension)) { $this->extension = $extension; } }
/** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) { parent::__construct(array()); $this->locator = $locator; $this->parser = $parser; $this->cache = array(); }
/** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance * @param ActiveTheme $activeTheme */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, ActiveTheme $activeTheme = null) { parent::__construct(array()); $this->locator = $locator; $this->parser = $parser; $this->activeTheme = $activeTheme; }
/** * AliasLoader constructor. * * @param $paths * An array of paths to pass to the parent constructor. * @param $aliases * An array of alias/path pairs. */ public function __construct($paths, $aliases) { parent::__construct($paths); foreach ($aliases as $alias => $path) { $this->addPath($path, $alias); } }
/** * Constructs a new FilesystemLoader object. * * @param string|array $paths * A path or an array of paths to check for templates. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler service. * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler service. */ public function __construct($paths = array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) { parent::__construct($paths); // Add namespaced paths for modules and themes. $namespaces = array(); foreach ($module_handler->getModuleList() as $name => $extension) { $namespaces[$name] = $extension->getPath(); } foreach ($theme_handler->listInfo() as $name => $extension) { $namespaces[$name] = $extension->getPath(); } foreach ($namespaces as $name => $path) { $this->addPath($path . '/templates', $name); } }
/** * Constructor. * * @param string|array $paths A path or an array of paths where to look for templates */ public function __construct($theme, $base_theme = array()) { $cached = cache_get($theme . ':twig_paths'); $paths = array(); if ($cached) { $this->setPaths($cached->data, $theme); $paths = array_merge($paths, $cached->data); } foreach ($base_theme as $theme_info) { $cached = cache_get($theme_info->name . ':twig_paths'); if ($cached) { $this->setPaths($cached->data, $theme_info->name); $paths = array_merge($paths, $cached->data); } } parent::__construct($paths); }
/** * TwigFilesystemLoader constructor. * * @param array|string $paths * @param string $separator */ public function __construct($paths, $separator = '.') { $this->separator = $separator; parent::__construct($paths); }
public function __construct() { parent::__construct(); }
public function __construct(Application $application) { parent::__construct(); $this->setApplication($application)->setPaths($application->getAbsolutePath(Environment::DIR_TEMPLATES)); }
/** * Constructor * * @param string|array $paths * @param string $extension * @return void */ public function __construct($paths = [], $extension = 'twig') { parent::__construct($paths); $this->extension = $extension; }
/** * Constructor. * * @param FilesystemInterface $filesystem The filesystem to use * @param array|string $paths A path or an array of paths where to look for templates */ public function __construct(FilesystemInterface $filesystem, $paths = []) { $this->filesystem = $filesystem; parent::__construct($paths); }
/** * Constructor. * * @param TemplateNameParserInterface $nameParser A TemplateNameParserInterface instance */ public function __construct(TemplateNameParserInterface $nameParser, array $paths = array(), LoggerInterface $logger = null) { parent::__construct($paths); $this->nameParser = $nameParser; $this->logger = $logger; }
/** * Constructor. * * @param FilesystemLoader $loader * @param TemplateNameParserInterface $parser */ public function __construct(FilesystemLoader $loader, TemplateNameParserInterface $parser = null) { parent::__construct([]); $this->loader = $loader; $this->parser = $parser ?: new TemplateNameParser(); }
public function __construct(tubepress_api_log_LoggerInterface $logger, array $paths) { parent::__construct($paths); $this->_logger = $logger; $this->_shouldLog = $logger->isEnabled(); }
function __construct($paths, $alwaysReload = false) { $this->alwaysReload = $alwaysReload; parent::__construct($paths); }
/** * Class init * * @param array $paths */ public function __construct($paths = array()) { parent::__construct($paths); }
/** * Constructs the loader. * * @param \Twig_LoaderInterface $loader a twig loader */ public function __construct(\Twig_LoaderInterface $loader, SiteContext $siteContext) { parent::__construct(); $this->loader = $loader; $this->siteContext = $siteContext; }
/** * Constructor * * @param \Mni\FrontYAML\Parser $parser * @param array $paths */ public function __construct(Parser $parser, $paths = []) { parent::__construct($paths); $this->parser = $parser; }
/** * Constructor * * @param \phpbb\filesystem\filesystem_interface $filesystem * @param string|array $paths */ public function __construct(\phpbb\filesystem\filesystem_interface $filesystem, $paths = array()) { $this->filesystem = $filesystem; parent::__construct($paths); }
/** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, $rootPath = null) { parent::__construct(array(), $rootPath); $this->locator = $locator; $this->parser = $parser; }
public function __construct($paths, $locator = null) { parent::__construct($paths); $this->locator = $locator; }
public function __construct($paths, $default_template, $base_template = true) { parent::__construct($paths); $this->default_template = $default_template; $this->base_template = $base_template; }
public function __construct() { parent::__construct(array()); $this->resolverCache = array(); }
public function __construct($paths, $useTimeInCacheKey = false) { parent::__construct($paths); $this->useTimeInCacheKey = $useTimeInCacheKey; $this->templateStrings = array(); }