Class PHP_Template

Description

The SquirrelMail PHP Template class. Extends the base Template class for use with PHP template pages.

Located in /class/template/PHP_Template.class.php (line 30)

Template
   |
   --PHP_Template
Variable Summary
array $values
Method Summary
PHP_Template PHP_Template (string $template_id)
void append (array|string $tpl_var, [mixed $value = NULL], [boolean $merge = FALSE])
void append_by_ref (string $tpl_var,  &$value, [boolean $merge = FALSE], mixed $value)
string apply_template (string $filepath)
void assign (array|string $tpl_var, [mixed $value = NULL])
void assign_by_ref (string $tpl_var,  &$value, mixed $value)
mixed get_template_vars ([string $varname = NULL])
Variables
Methods
Constructor PHP_Template (line 50)

Constructor

Please do not call directly. Use Template::construct_template().

PHP_Template PHP_Template (string $template_id)
  • string $template_id: the template ID
append (line 165)

Appends values to template variables

void append (array|string $tpl_var, [mixed $value = NULL], [boolean $merge = FALSE])
  • array|string $tpl_var: the template variable name(s)
  • mixed $value: the value to append
  • boolean $merge: when $value is given as an array, this indicates whether or not that array itself should be appended as a new template variable value or if that array's values should be merged into the existing array of template variable values

Redefinition of:
Template::append()
Appends values to template variables
append_by_ref (line 226)

Appends values to template variables by reference

void append_by_ref (string $tpl_var,  &$value, [boolean $merge = FALSE], mixed $value)
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to append
  • boolean $merge: when $value is given as an array, this indicates whether or not that array itself should be appended as a new template variable value or if that array's values should be merged into the existing array of template variable values
  • &$value

Redefinition of:
Template::append_by_ref()
Appends values to template variables by reference
apply_template (line 252)

Applys the template and generates final output destined for the user's browser

  • return: The output for the given template
string apply_template (string $filepath)
  • string $filepath: The full file path to the template to be applied

Redefinition of:
Template::apply_template()
Applys the template and generates final output destined for the user's browser
assign (line 71)

Assigns values to template variables

void assign (array|string $tpl_var, [mixed $value = NULL])
  • array|string $tpl_var: the template variable name(s)
  • mixed $value: the value to assign

Redefinition of:
Template::assign()
Assigns values to template variables
assign_by_ref (line 99)

Assigns values to template variables by reference

void assign_by_ref (string $tpl_var,  &$value, mixed $value)
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
  • &$value

Redefinition of:
Template::assign_by_ref()
Assigns values to template variables by reference
clear_all_assign (line 110)

Clears the values of all assigned varaiables.

void clear_all_assign ()

Redefinition of:
Template::clear_all_assign()
Clears the values of all assigned varaiables.
get_template_vars (line 129)

Returns assigned variable value(s).

  • return: Desired single variable value or list of all assigned variable values.
mixed get_template_vars ([string $varname = NULL])
  • string $varname: If given, the value of that variable is returned, assuming it has been previously assigned. If not specified an array of all assigned variables is returned. (optional)

Redefinition of:
Template::get_template_vars()
Returns assigned variable value(s).

Inherited Methods

Inherited From Template

Template::Template()
Template::append()
Template::append_by_ref()
Template::apply_template()
Template::assign()
Template::assign_by_ref()
Template::cache_template_file_hierarchy()
Template::calculate_template_file_directory()
Template::calculate_template_images_directory()
Template::catalog_template_files()
Template::clear_all_assign()
Template::construct_template()
Template::display()
Template::fetch()
Template::fetch_external_stylesheet_links()
Template::fetch_right_to_left_stylesheet_link()
Template::fetch_standard_stylesheet_links()
Template::find_and_cache_plugin_template_file()
Template::get_alternative_stylesheets()
Template::get_content_type()
Template::get_default_template_set()
Template::get_fallback_template_file_directory()
Template::get_fallback_template_set()
Template::get_fallback_template_set_id()
Template::get_javascript_includes()
Template::get_rendering_template_engine_object()
Template::get_rpc_template_set()
Template::get_stylesheets()
Template::get_template_config()
Template::get_template_engine_subclass()
Template::get_template_file_directory()
Template::get_template_file_path()
Template::get_template_vars()
Template::header()
Template::override_plugins()
Template::set_up_template()

Documentation generated on Mon, 13 Jan 2020 04:23:21 +0100 by phpDocumentor 1.4.3