FlySystemLoader
in package
implements
LoaderInterface
FinalYes
Table of Contents
Interfaces
- LoaderInterface
Properties
- $filesystem : FilesystemInterface
- $overloadPrefix : string|null
- $templatePath : string
Methods
- __construct() : mixed
- exists() : mixed
- getCacheKey() : mixed
- Gets the cache key to use for the cache for a given template name.
- getSourceContext() : Source
- isFresh() : mixed
- 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(mixed $name) : mixed
Parameters
- $name : mixed
Tags
getCacheKey()
Gets the cache key to use for the cache for a given template name.
public
getCacheKey(mixed $name) : mixed
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 : mixed
Tags
getSourceContext()
public
getSourceContext(mixed $name) : Source
Parameters
- $name : mixed
Tags
Return values
SourceisFresh()
public
isFresh(mixed $name, mixed $time) : mixed
Parameters
- $name : mixed
- $time : mixed
Tags
guardTemplateExistsAndIsFile()
private
guardTemplateExistsAndIsFile(string $name) : void
Parameters
- $name : string
Tags
resolveTemplateName()
private
resolveTemplateName(string $name) : string
Parameters
- $name : string