ChainLoader

class ChainLoader extends Loader

ChainLoader is a loader that calls other loaders to load templates.

Methods

setLogger(LoggerInterface $logger)

Sets the debug logger to use for this loader.

from Loader
setDebugger(DebuggerInterface $debugger) deprecated

Sets the debugger to use for this loader.

from Loader
__construct(array $loaders = array())

Constructor.

addLoader(LoaderInterface $loader)

Adds a loader instance.

Storage|bool load(TemplateReferenceInterface $template)

Loads a template.

bool isFresh(TemplateReferenceInterface $template, int $time)

Returns true if the template is still fresh.

Details

setLogger(LoggerInterface $logger)

Sets the debug logger to use for this loader.

Parameters

LoggerInterface $logger A logger instance

setDebugger(DebuggerInterface $debugger) deprecated

deprecated

since version 2.4, to be removed in 3.0. Use $this->setLogger() instead.

Sets the debugger to use for this loader.

Parameters

DebuggerInterface $debugger A debugger instance

__construct(array $loaders = array())

Constructor.

Parameters

array $loaders An array of loader instances

addLoader(LoaderInterface $loader)

Adds a loader instance.

Parameters

LoaderInterface $loader A Loader 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
doc_Symfony
2016-10-28 06:08:27
Comments
Leave a Comment

Please login to continue.