Class: HTML_Template_IT
Source Location: /HTML_Template_IT-1.1.2/IT.php
Integrated Template - IT
Author(s):
Version:
- $Id: IT.php,v 1.13 2005/10/28 11:00:33 dufuz Exp $
|
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
$blockdata = array()
[line 237]
Array with the parsed content of a block.
$blockinner = array()
[line 249]
Array of inner blocks of a block.
$blocklist = array()
[line 230]
Array of all blocks and their content.
$blocknameRegExp = '[0-9A-Za-z_-]+'
[line 165]
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 210]
RegExp used to find blocks an their content, filled by the constructor.
$blockvariables = array()
[line 243]
Array of variables in a block.
$clearCache = false
[line 139]
Clear cache on get()?
$clearCacheOnParse = false
[line 306]
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 155]
Last character of a variable placeholder ( {VARIABLE_}_ ).
$currentBlock = '__global__'
[line 216]
Name of the current block.
$err = array()
[line 133]
Contains the error objects
$fileRoot = ''
[line 314]
Root directory for all file operations. The string gets prefixed to all filenames given.
$flagBlocktrouble = false
[line 320]
Internal flag indicating that a blockname was used multiple times.
$flagCacheTemplatefile = true
[line 340]
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 326]
Flag indicating that the global block was parsed.
$lastTemplatefile = ''
[line 345]
EXPERIMENTAL! FIXME!
$openingDelimiter = '{'
[line 147]
First character of a variable placeholder ( _{_VARIABLE} ).
$removeEmptyBlocks = true
[line 203]
Controls the handling of empty blocks, default is remove.
$removeUnknownVariables = true
[line 196]
Controls the handling of unknown variables, default is remove.
$removeVariablesRegExp = ''
[line 189]
RegExp used to strip unused variable placeholder.
$template = ''
[line 222]
Content of the template.
$touchedBlocks = array()
[line 276]
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 295]
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 175]
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 183]
RegExp used to find variable placeholder, filled by the constructor.
Method Detail
Documentation generated on Mon, 11 Mar 2019 14:11:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|