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


PHP Twig_Loader_Filesystem::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($paths = array(), $extension = null)
 {
     parent::__construct($paths);
     if (is_null($extension)) {
         $this->extension = $extension;
     }
 }
开发者ID:reekoheek,项目名称:twig-theme,代码行数:7,代码来源:Filesystem.php

示例2: __construct

 /**
  * 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();
 }
开发者ID:dragoonis,项目名称:framework,代码行数:13,代码来源:FileSystemLoader.php

示例3: __construct

 /**
  * 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;
 }
开发者ID:xabbuh,项目名称:LiipThemeBundle,代码行数:14,代码来源:FilesystemLoader.php

示例4: __construct

 /**
  * 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);
     }
 }
开发者ID:bitmade,项目名称:node-twig,代码行数:15,代码来源:AliasLoader.php

示例5: __construct

 /**
  * 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);
     }
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:25,代码来源:FilesystemLoader.php

示例6: __construct

 /**
  * 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);
 }
开发者ID:bangpound,项目名称:drupal-bridge,代码行数:22,代码来源:DrupalLoader.php

示例7: __construct

 /**
  * TwigFilesystemLoader constructor.
  *
  * @param array|string $paths
  * @param string       $separator
  */
 public function __construct($paths, $separator = '.')
 {
     $this->separator = $separator;
     parent::__construct($paths);
 }
开发者ID:im286er,项目名称:windwalker,代码行数:11,代码来源:TwigFilesystemLoader.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:acamboy,项目名称:starter-public-edition-3,代码行数:4,代码来源:Filesystem.php

示例9: __construct

 public function __construct(Application $application)
 {
     parent::__construct();
     $this->setApplication($application)->setPaths($application->getAbsolutePath(Environment::DIR_TEMPLATES));
 }
开发者ID:panadas,项目名称:plugin-twig,代码行数:5,代码来源:Filesystem.php

示例10: __construct

 /**
  * Constructor
  *
  * @param string|array $paths
  * @param string $extension
  * @return void
  */
 public function __construct($paths = [], $extension = 'twig')
 {
     parent::__construct($paths);
     $this->extension = $extension;
 }
开发者ID:akuzemchak,项目名称:laratwig,代码行数:12,代码来源:FileLoader.php

示例11: __construct

 /**
  * 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);
 }
开发者ID:bolt,项目名称:bolt,代码行数:11,代码来源:FilesystemLoader.php

示例12: __construct

 /**
  * 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;
 }
开发者ID:notbrain,项目名称:symfony,代码行数:11,代码来源:FilesystemLoader.php

示例13: __construct

 /**
  * 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();
 }
开发者ID:LibraryOfLawrence,项目名称:pagekit,代码行数:12,代码来源:TwigLoader.php

示例14: __construct

 public function __construct(tubepress_api_log_LoggerInterface $logger, array $paths)
 {
     parent::__construct($paths);
     $this->_logger = $logger;
     $this->_shouldLog = $logger->isEnabled();
 }
开发者ID:tubepress,项目名称:tubepress,代码行数:6,代码来源:FsLoader.php

示例15:

 function __construct($paths, $alwaysReload = false)
 {
     $this->alwaysReload = $alwaysReload;
     parent::__construct($paths);
 }
开发者ID:BGCX262,项目名称:zwig-svn-to-git,代码行数:5,代码来源:Filesystem.php


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