Overview

Namespaces

  • None
  • opensourceame

Classes

  • form_state
  • sql_query
  • sql_query_builder
  • stash_bean
  • stash_collection
  • stash_framework
  • stash_mysql
  • stash_mysql_collection
  • stash_mysql_framework
  • XTemplate
  • ztemplate

Functions

  • get_arguments
  • get_form_state
  • print_help
  • print_version
  • processTime
  • register_form_state
  • unregister_form_state
  • Overview
  • Namespace
  • Class
  • Tree

Class ztemplate

zTemplate class

Located at ztemplate/opensourceame.ztemplate.php
Methods summary
public boolean
# __construct( string $file = null, array $options = null )
Class constructor

Class constructor

Parameters

$file
string
the filename to open and parse
$options
array
an array of config options

Returns

boolean
true on successul load and parse of the template, otherwise false
public
# load_template( $file )
used to to manually load a template if one is not specified when constructing

used to to manually load a template if one is not specified when constructing

public
# set_option( $opt, $val = null )
Set an option

Set an option

public array
# errors( )

Returns

array
a list of errors that have occurred
private
# add_error( $message )
log an error

log an error

private
# clear_cache( $block )
clear a cached block

clear a cached block

public
# assign( $var, $val )
assign a variable

assign a variable

public
# assign_file( $var, $file )
assign a file that can be included into the current template

assign a file that can be included into the current template

public
# out( string $blockname = null, string $file = null )
output a block, optionally to a file

output a block, optionally to a file

Parameters

$blockname
string
name of the block to output
$file
string
optional filename to write output to
public
# get( string $blockname = null )
get a parsed block

get a parsed block

Parameters

$blockname
string
the name of the block to return
public
# print_errors( )
print errors inside preformatted tags

print errors inside preformatted tags

private
# add_debug( $message )
log a debugging message

log a debugging message

public boolean
# parse( string $blockname )
parse a block

parse a block

Parameters

$blockname
string
name of the block to parse

Returns

boolean
public boolean
# reset( string $block )
Reset a block

Reset a block

Parameters

$block
string
name of the block

Returns

boolean
public boolean
# var_is_set( string $var )
Check if a variable has been set

Check if a variable has been set

Parameters

$var
string
variable name

Returns

boolean
private
# parser_get_vars( )
Get variables from lines in each block

Get variables from lines in each block

private boolean
# parse_add_line( string $block, string $line )
Add a line to the parsed block

Add a line to the parsed block

Parameters

$block
string
the block name
$line
string
the line of text to add

Returns

boolean
private boolean
# parse_template_file( string $file, string $bp = null )
Parse a template

Parse a template

Parameters

$file
string
filename to open and parse
$bp
string
the block path (e.g. main.block1.block2)

Returns

boolean
public string
# text( string $blockname )
Return the text of a block

Return the text of a block

Parameters

$blockname
string
name of the block

Returns

string
Constants summary
string version '1.1.8'
#
Properties summary
private boolean $template true
#
private array $cachedblocks array()
#
private array $blocks array()
#
private array $parsed array()
#
protected array $stblocks array()
#
OpenSourceAme API Documentation API documentation generated by ApiGen.
Generated using the TokenReflection library.