[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/ -> template.php (summary)

(no description)

Copyright: (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 692 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

template:: (14 methods):
  set_template()
  set_custom_template()
  set_filenames()
  destroy()
  destroy_block_vars()
  display()
  assign_display()
  _tpl_load()
  assign_vars()
  assign_var()
  assign_block_vars()
  alter_block_array()
  _tpl_include()
  _php_include()


Class: template  - X-Ref

Base Template class.

set_template()   X-Ref
Set template location


set_custom_template($template_path, $template_name, $fallback_template_path = false)   X-Ref
Set custom template location (able to use directory outside of phpBB)


set_filenames($filename_array)   X-Ref
Sets the template filenames for handles. $filename_array
should be a hash of handle => filename pairs.


destroy()   X-Ref
Destroy template data set


destroy_block_vars($blockname)   X-Ref
Reset/empty complete block


display($handle, $include_once = true)   X-Ref
Display handle


assign_display($handle, $template_var = '', $return_content = true, $include_once = false)   X-Ref
Display the handle and assign the output to a template variable or return the compiled result.


_tpl_load(&$handle)   X-Ref
Load a compiled template if possible, if not, recompile it


assign_vars($vararray)   X-Ref
Assign key variable pairs from an array


assign_var($varname, $varval)   X-Ref
Assign a single variable to a single key


assign_block_vars($blockname, $vararray)   X-Ref
Assign key variable pairs from an array to a specified block


alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')   X-Ref
Change already assigned key variable pair (one-dimensional - single loop entry)

An example of how to use this function:
{@example alter_block_array.php}

param: string    $blockname    the blockname, for example 'loop'
param: array    $vararray    the var array to insert/add or merge
param: mixed    $key        Key to search for
param: string    $mode        Mode to execute (valid modes are 'insert' and 'change')
return: bool false on error, true on success

_tpl_include($filename, $include = true)   X-Ref
Include a separate template


_php_include($filename)   X-Ref
Include a php-file




Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1