[ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 1001 lignes (32 kb) |
Inclus ou requis: | 2 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier PEAR.php |
HTML_Template_IT:: (22 méthodes):
HTML_Template_IT()
setOption()
setOptions()
show()
get()
parse()
parseCurrentBlock()
setVariable()
setCurrentBlock()
touchBlock()
init()
free()
setTemplate()
loadTemplatefile()
setRoot()
buildBlockvariablelist()
getGlobalvariables()
findBlocks()
getFile()
_addPregDelimiters()
_preserveOpeningDelimiter()
errorMessage()
Classe: HTML_Template_IT - X-Ref
Integrated Template - ITHTML_Template_IT($root = '', $options = null) X-Ref |
Builds some complex regular expressions and optinally sets the file root directory. Make sure that you call this constructor if you derive your template class from this one. param: string File root directory, prefix for all filenames |
setOption($option, $value) X-Ref |
Sets the option for the template class param: string option name param: mixed option value return: mixed IT_OK on success, error object on failure |
setOptions($options) X-Ref |
Sets the options for the template class param: string options array of options param: mixed option value return: mixed IT_OK on success, error object on failure |
show($block = '__global__') X-Ref |
Print a certain block with all replacements done. |
get($block = '__global__') X-Ref |
Returns a block with all replacements done. param: string name of the block return: string |
parse($block = '__global__', $flag_recursion = false) X-Ref |
Parses the given block. param: string name of the block to be parsed |
parseCurrentBlock() X-Ref |
Parses the current block |
setVariable($variable, $value = '') X-Ref |
Sets a variable value. The function can be used eighter like setVariable( "varname", "value") or with one array $variables["varname"] = "value" given setVariable($variables) quite like phplib templates set_var(). param: mixed string with the variable name or an array param: string value of the variable or empty if $variable param: string prefix for variable names |
setCurrentBlock($block = '__global__') X-Ref |
Sets the name of the current block that is the block where variables are added. param: string name of the block return: boolean false on failure, otherwise true |
touchBlock($block) X-Ref |
Preserves an empty block even if removeEmptyBlocks is true. param: string name of the block return: boolean false on false, otherwise true |
init() X-Ref |
Clears all datafields of the object and rebuild the internal blocklist LoadTemplatefile() and setTemplate() automatically call this function when a new template is given. Don't use this function unless you know what you're doing. |
free() X-Ref |
Clears all datafields of the object. Don't use this function unless you know what you're doing. |
setTemplate( $template, $removeUnknownVariables = true,$removeEmptyBlocks = true) X-Ref |
Sets the template. You can eighter load a template file from disk with LoadTemplatefile() or set the template manually using this function. param: string template content param: boolean remove unknown/unused variables? param: boolean remove empty blocks? return: boolean |
loadTemplatefile( $filename,$removeUnknownVariables = true,$removeEmptyBlocks = true ) X-Ref |
Reads a template file from the disk. param: string name of the template file param: bool how to handle unknown variables. param: bool how to handle empty blocks. return: boolean false on failure, otherwise true |
setRoot($root) X-Ref |
Sets the file root. The file root gets prefixed to all filenames passed to the object. Make sure that you override this function when using the class on windows. param: string |
buildBlockvariablelist() X-Ref |
Build a list of all variables within of a block |
getGlobalvariables() X-Ref |
Returns a list of all global variables |
findBlocks($string) X-Ref |
Recusively builds a list of all blocks within the template. param: string string that gets scanned |
getFile($filename) X-Ref |
Reads a file from disk and returns its content. param: string Filename return: string Filecontent |
_addPregDelimiters($str) X-Ref |
Adds delimiters to a string, so it can be used as a pattern in preg_* functions param: string return: string |
_preserveOpeningDelimiter($str) X-Ref |
Replaces an opening delimiter by a special string param: string return: string |
errorMessage($value, $blockname = '') X-Ref |
Return a textual error message for a IT error code param: integer $value error code return: string error message, or false if the error code was |
Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |