FilesystemLoader

class FilesystemLoader implements LoaderInterface

FilesystemLoader is a loader that read templates from the filesystem.

Methods

__construct(FileLocatorInterface $locator)

Constructor.

Storage|bool load(TemplateReferenceInterface $template)

Loads a template.

bool isFresh(TemplateReferenceInterface $template, int $time)

Returns true if the template is still fresh.

Details

__construct(FileLocatorInterface $locator)

Constructor.

Parameters

FileLocatorInterface $locator A FileLocatorInterface instance

Storage|bool load(TemplateReferenceInterface $template)

Loads a template.

Parameters

TemplateReferenceInterface $template A template

Return Value

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

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.html