Symfony\Bundle\TwigBundle\Loader\FilesystemLoader::__construct PHP Method

__construct() public method

Constructor.
public __construct ( Symfony\Component\Config\FileLocatorInterface $locator, Symfony\Component\Templating\TemplateNameParserInterface $parser, string | null $rootPath = null )
$locator Symfony\Component\Config\FileLocatorInterface A FileLocatorInterface instance
$parser Symfony\Component\Templating\TemplateNameParserInterface A TemplateNameParserInterface instance
$rootPath string | null 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;
    }

Usage Example

Esempio n. 1
0
 /**
  * @param ThemeManager                $themeManager
  * @param FileLocatorInterface        $locator
  * @param TemplateNameParserInterface $parser
  */
 function __construct(ThemeManager $themeManager, FileLocatorInterface $locator, TemplateNameParserInterface $parser)
 {
     $this->themeManager = $themeManager;
     parent::__construct($locator, $parser);
 }
All Usage Examples Of Symfony\Bundle\TwigBundle\Loader\FilesystemLoader::__construct