class FilesystemLoader implements LoaderInterface

deprecated since version 4.3, to be removed in 5.0; use Twig instead.

FilesystemLoader is a loader that read templates from the filesystem.

Properties

protected $locator

Methods

__construct(FileLocatorInterface $locator)

No description

Storage|bool
load(TemplateReferenceInterface $template)

Loads a template.

bool
isFresh(TemplateReferenceInterface $template, int $time)

Returns true if the template is still fresh.

Details

at line 32
__construct(FileLocatorInterface $locator)

Parameters

FileLocatorInterface $locator

at line 40
Storage|bool load(TemplateReferenceInterface $template)

Loads a template.

Parameters

TemplateReferenceInterface $template

Return Value

Storage|bool false if the template cannot be loaded, a Storage instance otherwise

at line 54
bool isFresh(TemplateReferenceInterface $template, int $time)

Returns true if the template is still fresh.

Parameters

TemplateReferenceInterface $template A template
int $time The last modification time of the cached template (timestamp)

Return Value

bool