Class

FileTemplateLoader

Package: IO\Template\loader Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Loic ROUCHON horn@phpboost.com Version: PHPBoost 5.2 - last update: 2017 04 25 Since: PHPBoost 3.0 - 2009 06 18 Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Located at: io/template/loader/FileTemplateLoader.class.php

This loader is the most used. It takes a file identifier as input. This identifier corresponds to a file that can be different from the user's theme. In fact, when it loads a template, its looks for it at several places. For a module template, it can be the default one which is in the /module/templates directory, but if the file is specialized by the theme, it loads it from the theme directory. All that is explained in the FileTemplate class description. This loader supports caching and stores cache files in the /cache/tpl directory, their name are related to their source's real path.

FileTemplateLoader implements TemplateLoader
Methods summary
public
# __construct( string $identifier, TemplateData $data )

Constructs a FileTemplateLoader from the file's identifier.

public string
# load( )

Loads the template.

public boolean
# supports_caching( )

Tells whether the loader supports caching. If it supports it, its FileTemplateLoader::get_cache_file_path() will have to return a non-empty value.

public string
# get_cache_file_path( )

Returns the path of the cache file that can be directly executed by the include PHP instruction. This method must be called only if the loader supports caching, the FileTemplateLoader::supports_caching() enabled you to know that.

public