Symfony2 API
Class

Symfony\Component\Templating\Loader\ChainLoader

class ChainLoader extends Loader

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

Methods

__construct(array $loaders = array())

Constructor.

addLoader(LoaderInterface $loader)

Adds a loader instance.

Storage|Boolean load(TemplateReferenceInterface $template)

Loads a template.

Boolean isFresh(TemplateReferenceInterface $template, integer $time)

Returns true if the template is still fresh.

Details

at line 31
public __construct(array $loaders = array())

Constructor.

Parameters

array $loaders An array of loader instances

at line 44
public addLoader(LoaderInterface $loader)

Adds a loader instance.

Parameters

LoaderInterface $loader A Loader instance

at line 56
public Storage|Boolean load(TemplateReferenceInterface $template)

Loads a template.

Parameters

TemplateReferenceInterface $template A template

Return Value

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

at line 75
public Boolean isFresh(TemplateReferenceInterface $template, integer $time)

Returns true if the template is still fresh.

Parameters

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

Return Value

Boolean