Class

Symfony\Component\Templating\Loader\FilesystemLoader

class FilesystemLoader extends Loader

FilesystemLoader is a loader that read templates from the filesystem.

Methods

setLogger(LoggerInterface $logger)

Sets the debug logger to use for this loader.

from Loader
setDebugger(DebuggerInterface $debugger)

Sets the debugger to use for this loader.

from Loader
__construct(array $templatePathPatterns)

Constructor.

Storage|bool load(TemplateReferenceInterface $template)

Loads a template.

bool isFresh(TemplateReferenceInterface $template, int $time)

Returns true if the template is still fresh.

Details

in Loader at line 39
public setLogger(LoggerInterface $logger)

Sets the debug logger to use for this loader.

Parameters

LoggerInterface $logger A logger instance

in Loader at line 51
public setDebugger(DebuggerInterface $debugger)

Sets the debugger to use for this loader.

Parameters

DebuggerInterface $debugger A debugger instance

at line 36
public __construct(array $templatePathPatterns)

Constructor.

Parameters

array $templatePathPatterns An array of path patterns to look for templates

at line 50
public 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

at line 102
public 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 true if the template is still fresh, false otherwise