HTML_Template_PHPLIB
[ class tree: HTML_Template_PHPLIB ] [ index: HTML_Template_PHPLIB ] [ all elements ]

Class: HTML_Template_PHPLIB_Generator

Source Location: /HTML_Template_PHPLIB-1.6.1/HTML/Template/PHPLIB/Generator.php

Class Overview


Generates code to be used with templates


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 25]
Generates code to be used with templates


[ Top ]


Method Detail

getBlocks   [line 108]

array getBlocks( array $arLines)

Returns an array of blocks in the given template code.

The array values are array with a key "name" and "sub", an array of nested blocks.

  • Return: Array of blocks
  • Access: public

Parameters:

array   $arLines   —  Template code lines

[ Top ]

getCodeBlock   [line 79]

string getCodeBlock( array $arBlocks, string $strTplName, [string $strPrefix = '$tpl'])

Creates the PHP code for the given array of blocks.
  • Return: PHP code

Parameters:

array   $arBlocks   —  Array of blocks, see getBlocks()
string   $strTplName   —  Template reference name
string   $strPrefix   —  Prefix to prepend before the code

[ Top ]

getCodeBlockDefinition   [line 37]

string getCodeBlockDefinition( string $strFile, [string $strTplName = null], [string $strPrefix = '$tpl'])

Creates the code to use a given template file
  • Return: PHP code

Parameters:

string   $strFile   —  Template file
string   $strTplName   —  Template reference name
string   $strPrefix   —  Prefix to prepend before the code

[ Top ]

getTemplateNameFromFilename   [line 154]

string getTemplateNameFromFilename( string $strFile)

Creates a name that can be used as handle for a template, from the given file name.
  • Return: Template name
  • Access: public

Parameters:

string   $strFile   —  File name

[ Top ]


Documentation generated on Tue, 10 Dec 2019 05:16:06 -0500 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.