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