Documentation

Vtiger_StringTemplate
in package

Template class will enable you to replace a merge fields defined in the String with values set dynamically.

Tags
author

Prasad

Table of Contents

$_lookfor  : mixed
Identify variable with the following pattern $VARIABLE_KEY$.
$tplvars  : mixed
__construct()  : mixed
Constructor.
__formatAsRegex()  : mixed
Clean up the input to be used as a regex.
assign()  : mixed
Assign replacement value for the variable.
clear()  : mixed
Clear all the assigned variable values.
get()  : mixed
Get replacement value for the variable.
merge()  : mixed
Merge the given file with variable values assigned.

Properties

$_lookfor

Identify variable with the following pattern $VARIABLE_KEY$.

public mixed $_lookfor = '/\\$([^\\$]+)\\$/'

Methods

__construct()

Constructor.

public __construct() : mixed
Return values
mixed

__formatAsRegex()

Clean up the input to be used as a regex.

public __formatAsRegex(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

assign()

Assign replacement value for the variable.

public assign(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed
Return values
mixed

clear()

Clear all the assigned variable values.

public clear([mixed $exceptvars = false ]) : mixed

(except the once in the given list).

Parameters
$exceptvars : mixed = false
Return values
mixed

get()

Get replacement value for the variable.

public get(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

merge()

Merge the given file with variable values assigned.

public merge( $instring[,  $avoidLookup = false ]) : mixed
Parameters
$instring :

input string template

$avoidLookup : = false

should be true if only verbatim file copy needs to be done

Tags
returns

merged contents

Return values
mixed

        

Search results