phpDocumentor

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

$overloadPrefix

private string|null $overloadPrefix

prefix used to allow extends of base templates. For example {% extends 'template::css/template.css.twig' %}

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
bool

getCacheKey()

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
throws
LoaderError

When $name is not found.

inheritDoc
Return values
string

getSourceContext()

public getSourceContext(string $name) : Source
Parameters
$name : string
Return values
Source

isFresh()

public isFresh(string $name, mixed $time) : bool
Parameters
$name : string
$time : mixed
Tags
inheritDoc
Return values
bool

guardTemplateExistsAndIsFile()

private guardTemplateExistsAndIsFile(string $name) : void
Parameters
$name : string
Tags
throws
LoaderError

resolveTemplateName()

private resolveTemplateName(string $name) : string
Parameters
$name : string
Return values
string

        
On this page

Search results