Class class_template

Description

This class does all the template stuff as loading, parsing, etc..

Located in /system/class_template.php (line 14)


	
			
Method Summary
static object The getInstance ()
void __destruct ()
bool containesPlaceholder (string $strIdentifier, string $strPlaceholdername)
void deletePlaceholder (string $strText)
void fillConstants ()
string fillCurrentTemplate (mixed $arrContent, [bool $bitRemovePlaceholder = true])
string fillTemplate (mixed $arrContent, string $strIdentifier, [bool $bitRemovePlaceholder = true], [class_lang_wrapper $objLangWrapper = null])
mixed getElements (string $strIdentifier, [int $intMode = 0])
string getTemplate ()
string readTemplate (string $strName, [string $strSection = ""], [bool $bitForce = false], [bool $bitThrowErrors = false])
void setArea (string $strArea)
void setTemplate (string $strTemplate)
Methods
static getInstance (line 66)

Returns one instance of the template object, using a singleton pattern

  • return: template object
  • access: public
static object The getInstance ()
Destructor __destruct (line 52)
  • access: public
void __destruct ()
containesPlaceholder (line 272)

Checks if the template referenced by the identifier containes the placeholder provided by the second param.

  • access: public
bool containesPlaceholder (string $strIdentifier, string $strPlaceholdername)
  • string $strIdentifier
  • string $strPlaceholdername
deletePlaceholder (line 240)

Deletes placholder in the template set by setTemplate()

  • access: public
void deletePlaceholder (string $strText)
  • string $strText
fillConstants (line 220)

Replaces constants in the template set by setTemplate()

  • access: public
void fillConstants ()
fillCurrentTemplate (line 203)

Fills the current temp-template with the passed values.
Make sure to have the wanted template loaded before by using setTemplate()

  • return: The filled template
  • access: public
string fillCurrentTemplate (mixed $arrContent, [bool $bitRemovePlaceholder = true])
  • mixed $arrContent
  • bool $bitRemovePlaceholder
fillTemplate (line 165)

Fills a template with values passed in an array.

As an optional parameter an instance of class_lang_wrapper can be passed to fill placeholders matching the schema %%lang_...%% automatically.

  • return: The filled template
  • access: public
string fillTemplate (mixed $arrContent, string $strIdentifier, [bool $bitRemovePlaceholder = true], [class_lang_wrapper $objLangWrapper = null])
  • mixed $arrContent
  • string $strIdentifier
  • bool $bitRemovePlaceholder
  • class_lang_wrapper $objLangWrapper
getElements (line 288)

Returns the elements in a given template

  • access: public
mixed getElements (string $strIdentifier, [int $intMode = 0])
  • string $strIdentifier
  • int $intMode: 0 = regular page, 1 = master page
getNumberCacheSize (line 394)

Returns the number of cached template sections

  • access: public
int getNumberCacheSize ()
getTemplate (line 258)

Returns the template set by setTemplate() and sets its back to ""

  • access: public
string getTemplate ()
readTemplate (line 84)

Reads a template from the filesystem

  • return: The identifier for further actions
  • throws: class_exception
  • access: public
string readTemplate (string $strName, [string $strSection = ""], [bool $bitForce = false], [bool $bitThrowErrors = false])
  • string $strName
  • string $strSection
  • bool $bitForce: Force the passed template name, not adding the current area
  • bool $bitThrowErrors: If set true, the method throws exceptions in case of errors
setArea (line 373)

Sets an area such as portal / admin or admin/style/...

  • access: public
void setArea (string $strArea)
  • string $strArea
setTemplate (line 364)

Sets the passed template as the current temp-template

  • access: public
void setTemplate (string $strTemplate)
  • string $strTemplate

Documentation generated on Mon, 12 Apr 2010 21:21:49 +0200 by phpDocumentor 1.4.3