$blockdata = array()
[line 236]
Array with the parsed content of a block.
$blockinner = array()
[line 248]
Array of inner blocks of a block.
$blocklist = array()
[line 229]
Array of all blocks and their content.
$blocknameRegExp = '[\.0-9A-Za-z_-]+'
[line 164]
RegExp matching a block in the template.
Per default "sm" is used as the regexp modifier, "i" is missing. That means a case sensitive search is done.
$blockRegExp = ''
[line 209]
RegExp used to find blocks an their content, filled by the constructor.
$blockvariables = array()
[line 242]
Array of variables in a block.
$clearCache = false
[line 138]
Clear cache on get()?
$clearCacheOnParse = false
[line 305]
Clear the variable cache on parse?
If you're not an expert just leave the default false. True reduces memory consumption somewhat if you tend to add lots of values for unknown placeholder.
$closingDelimiter = '}'
[line 154]
Last character of a variable placeholder ( {VARIABLE_}_ ).
$currentBlock = '__global__'
[line 215]
Name of the current block.
$err = array()
[line 132]
Contains the error objects
$fileRoot = ''
[line 313]
Root directory for all file operations.
The string gets prefixed to all filenames given.
$flagBlocktrouble = false
[line 319]
Internal flag indicating that a blockname was used multiple times.
$flagCacheTemplatefile = true
[line 339]
EXPERIMENTAL! FIXME! Flag indication that a template gets cached.
Complex templates require some times to be preparsed before the replacement can take place. Often I use one template file over and over again but I don't know before that I will use the same template file again. Now IT could notice this and skip the preparse.
$flagGlobalParsed = false
[line 325]
Flag indicating that the global block was parsed.
$lastTemplatefile = ''
[line 344]
EXPERIMENTAL! FIXME!
$openingDelimiter = '{'
[line 146]
First character of a variable placeholder ( _{_VARIABLE} ).
$removeEmptyBlocks = true
[line 202]
Controls the handling of empty blocks, default is remove.
$removeUnknownVariables = true
[line 195]
Controls the handling of unknown variables, default is remove.
$removeVariablesRegExp = ''
[line 188]
RegExp used to strip unused variable placeholder.
$template = ''
[line 221]
Content of the template.
$touchedBlocks = array()
[line 275]
List of blocks to preverse even if they are "empty".
This is something special. Sometimes you have blocks that should be preserved although they are empty (no placeholder replaced). Think of a shopping basket. If it's empty you have to drop a message to the user. If it's filled you have to show the contents of the shopping baseket. Now where do you place the message that the basket is empty? It's no good idea to place it in you applications as customers tend to like unecessary minor text changes. Having another template file for an empty basket means that it's very likely that one fine day the filled and empty basket templates have different layout. I decided to introduce blocks that to not contain any placeholder but only text such as the message "Your shopping basked is empty".
Now if there is no replacement done in such a block the block will be recognized as "empty" and by default ($removeEmptyBlocks = true) be stripped off. To avoid thisyou can now call touchBlock() to avoid this.
The array $touchedBlocks stores a list of touched block which must not be removed even if they are empty.
$variableCache = array()
[line 294]
Variable cache.
Variables get cached before any replacement is done. Advantage: empty blocks can be removed automatically. Disadvantage: might take some more memory
$variablenameRegExp = '[\.0-9A-Za-z_-]+'
[line 174]
RegExp matching a variable placeholder in the template.
Per default "sm" is used as the regexp modifier, "i" is missing. That means a case sensitive search is done.
$variablesRegExp = ''
[line 182]
RegExp used to find variable placeholder, filled by the constructor.