Abstract Package: IO\Template Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Loic ROUCHON Version: PHPBoost 5.2 - last update: 2016 11 14 Since: PHPBoost 3.0 - 2009 06 18 Contributor: Regis VIARRE Contributor: Julien BRISWALTER Contributor: Arnaud GENET Contributor: mipel Located at: io/template/AbstractTemplate.class.php

This class is a default implementation of the Template interface using a TemplateLoader, a TemplateData and a TemplateParser.

AbstractTemplate implements Template
Direct known subclasses
FileTemplate, StringTemplate
Methods summary
# __construct( TemplateLoader $loader, TemplateRenderer $renderer, TemplateData $data )

Builds an AbstractTemplate from the different services it has to use.

# enable_strict_mode( )

Enables the strict mode. If a variable that does not exist in the object is requested, then an exception will be raised.

# disable_strict_mode( )

Disables the strict mode. If a variable that does not exist in the object is requested, then an empty value will be returned.

# put( $key, $value )

Assigns the value


to the template variable of name

# put_all( array $vars )

Assigns template variables. It could be simple variables, loop or subtemplates.

# assign_vars( array $array_vars )
# assign_block_vars( string $block_name, array $array_vars, array $subtemplates = array() )

Assigns a template block. A block represents a loop and has a name which be used in your template file to indicate which loop you want to browse. To know what syntax to use to browse a loop, see the class description, there are examples.

# add_subtemplate( string $identifier, Template $template )
# __clone( )
public string
# render( )

Returns a string representation of the view.

# display( $reorder_js = false )

Displays the template.

# add_lang( array $lang )

Adds a lang map to the template map list in which template variables beginning by L_ will be searched for of not already registered

# set_data( TemplateData $data )

Inject data into the template. This is for internal use only.

public TemplateData
# get_data( )

Returns the template data

public String
# get_pictures_data_path( )

Returns the pictures data path

Properties summary
protected TemplateLoader $loader
protected TemplateRenderer $renderer
protected TemplateData $data