FlySystemLoader implements LoaderInterface
FinalYes
Table of Contents
Interfaces
- LoaderInterface
Properties
- $filesystem : FilesystemInterface
- $overloadPrefix : string|null
- $templatePath : string
Methods
- __construct() : mixed
- exists() : bool
- getCacheKey() : string
- Gets the cache key to use for the cache for a given template name.
- getSourceContext() : Source
- isFresh() : bool
- guardTemplateExistsAndIsFile() : void
- resolveTemplateName() : string
Properties
$filesystem read-only
private
FilesystemInterface
$filesystem
$overloadPrefix
private
string|null
$overloadPrefix
prefix used to allow extends of base templates. For example
{% extends 'template::css/template.css.twig' %}
$templatePath read-only
private
string
$templatePath
= ''
Methods
__construct()
public
__construct(FilesystemInterface $filesystem[, string $templatePath = '' ][, string|null $overloadPrefix = null ]) : mixed
Parameters
- $filesystem : FilesystemInterface
- $templatePath : string = ''
- $overloadPrefix : string|null = null
exists()
public
exists(string $name) : bool
Parameters
- $name : string
Return values
boolgetCacheKey()
Gets the cache key to use for the cache for a given template name.
public
getCacheKey(string $name) : string
Simple straightforward implementation that checks the existence of the template, and if it exists: returns the name to be used as a cache key.
Parameters
- $name : string
Tags
Return values
stringgetSourceContext()
public
getSourceContext(string $name) : Source
Parameters
- $name : string
Return values
SourceisFresh()
public
isFresh(string $name, mixed $time) : bool
Parameters
- $name : string
- $time : mixed
Tags
Return values
boolguardTemplateExistsAndIsFile()
private
guardTemplateExistsAndIsFile(string $name) : void
Parameters
- $name : string
Tags
resolveTemplateName()
private
resolveTemplateName(string $name) : string
Parameters
- $name : string