File/common/pcf_templates.phpinc

Description

template parse functions

Constants
PCF_TMPLVAR_ARR = "*" (line 19)
PCF_TMPLVAR_ASIS = "\\" (line 43)
  • since: pk-05-01-17
PCF_TMPLVAR_BASE64 = "ß" (line 48)
  • since: pk-05-08-03
PCF_TMPLVAR_DBLOOKUP = "%" (line 38)
  • since: pk-04-10-18
PCF_TMPLVAR_GET = "^" (line 18)
PCF_TMPLVAR_GLOBALS = "@" (line 28)

Global Array $GLOBALS values

  • since: pk-03-12-23
PCF_TMPLVAR_IF = "?" (line 33)
  • since: pk-04-08-10
PCF_TMPLVAR_INCLUDE = "<" (line 59)
  • since: pk-05-08-29
PCF_TMPLVAR_POST = "§" (line 21)
PCF_TMPLVAR_SERVER = "°" (line 22)
PCF_TMPLVAR_SESSION = "~" (line 20)
PCF_TMPL_MAXVARLENGTH = 128 (line 54)
  • since: pk-05-05-12
Functions
pcf_templ_getVarArray (line 124)

returns an array with fields and types

array[SIMPLE|COMPLEX][TYPE][name]

each array element has a NAME, a TYPE and a replace string note COMPLEX elements are not splitted up

  • version: pk-05-05-12
  • version: pk-05-06-27 BUGFIX forgotten to add PCF_TMPLVAR_SERVER to simple type :-)
array pcf_templ_getVarArray (string $aTemplate, [char $varSign = &quot;\$&quot;], [bool $debug = False])
  • string $aTemplate
  • char $varSign
  • bool $debug
pcf_templ_getVarNames (line 253)

returns an array with variable names

  • version: pk-06-03-20
array pcf_templ_getVarNames (string $aTemplate, [char $varSign = &quot;\$&quot;], [bool $debug = False])
  • string $aTemplate
  • char $varSign
  • bool $debug
pcf_tmpl_findComplexReplace (line 76)

splits the template into the replace string of a complex var and the rest of the template

example "LINKTYPE....?$ asdfsadf " will return "$?LINKTYPE....?$" and set $aTemplate to " asdfsadf "

  • version: pk-05-06-23
string pcf_tmpl_findComplexReplace ( &$aTemplate, string $type, [ $varSign = &quot;\$&quot;], [boolean $debug = False], string $aTemplate)
  • string $aTemplate
  • string $type
  • boolean $debug
  • &$aTemplate
  • $varSign
pcf_tmpl_get (line 748)

reads $aFile in $GLOBALS['PROJECT']['TEMPLATEPATH'] parses the template with $aArr and returns it as string

  • version: pk-04-12-21
string pcf_tmpl_get (string $aFileName, [array $aArr = NULL], [bool $debug = False], [bool $fromTmplDir = True])
  • string $aFileName
  • array $aArr
  • bool $debug
  • bool $fromTmplDir
pcf_tmpl_getVars (line 307)

returns an array with fields found in the template

each array element has a NAME and a TYPE index

  • version: pk-05-05-12
  • version: pk-06-12-01
array pcf_tmpl_getVars (string $aTemplate, [char $varSign = '$'], [bool $debug = False])
  • string $aTemplate
  • char $varSign
  • bool $debug
pcf_tmpl_htmlgermChars (line 782)

converts german specialchars into theire html representation (&szlig ....)

  • since: pk-04-10-05
string pcf_tmpl_htmlgermChars (string $aText, [boolean $debug = False])
  • string $aText
  • boolean $debug
pcf_tmpl_parse (line 422)

parses a template and replaces the values found

  • version: pk-05-05-12 rewrite of the function
  • version: pk-05-01-14 DEFAULT added to if
  • version: pk-06-03-20 $*-JS['|"]~....$ added
  • version: pk-06-09-15 $b_valIsTemplate added
  • version: pk-07-10-05 $_GET['oaxArg'] added to $_GET
  • version:

    pk-08-06-27 ASIS

    NOTE if formats are added make sure the are removed in $this::pcf_templ_getVarNames()

string pcf_tmpl_parse (string $aTemplate, [array $aArr = NULL], [bool $debug = False], [char $varSign = &quot;\$&quot;])
  • string $aTemplate: the template to parse
  • array $aArr: the Array of the $* fields
  • bool $debug
  • char $varSign
pcf_tmpl_parseAdminFile (line 696)

parses am admin templdate (under $GLOBALS['OCSP']['ADMINPATH'] ../admin-tmpl)

string pcf_tmpl_parseAdminFile (string $aFileName, [array $aArr = NULL], [boolean $debug = False], [char $varSign = '$'])
  • string $aFileName
  • array $aArr
  • boolean $debug
  • char $varSign
pcf_tmpl_parseFile (line 667)

reads $aFile in $GLOBALS['PROJECT']['TEMPLATEPATH'] parses the template with $aArr and returns it returns if the template file was found

  • version: pk-05-08-29
  • version: pk-07-08-06 enable admin-tmpl
  • since: pk-05-02-14
string pcf_tmpl_parseFile (string $aFileName, [array $aArr = NULL], [boolean $debug = False], [char $varSign = '$'])
  • string $aFileName
  • array $aArr
  • boolean $debug
  • char $varSign
pcf_tmpl_repl_specials (line 339)

replaces specialvields ($#....$)

  • version: pk-06-11-14 #GROUPSIN added
  • version: pk-08-06-27 $@OCSP|PHPINCPATH$ added
  • since: pk-06-09-14
string pcf_tmpl_repl_specials (string $aTemplate, array $aArr, [boolean $debug = False])
  • string $aTemplate: the template to parse
  • array $aArr: the Array of the $* fields
  • boolean $debug
pcf_tmpl_repl_values (line 390)

replaces all simple datafields ($*FIELD$) with the value of $arr

NOTE: fields which are not set are not removed

  • since: pk-06-09-14
string pcf_tmpl_repl_values (string $aTemplate, array $aArr, [bool $debug = False], [char $varSign = &quot;\$&quot;])
  • string $aTemplate: the template to parse
  • array $aArr: the Array of the $* fields
  • bool $debug
  • char $varSign
pcf_tmpl_write (line 721)

echos pcf_tmpl_parseFile

  • version: pk-05-02-14 now calls pcf_tmpl_parseFile
string pcf_tmpl_write (string $aFileName, [array $aArr = NULL], [boolean $debug = False])
  • string $aFileName
  • array $aArr
  • boolean $debug

Documentation generated on Thu, 08 Jan 2009 17:47:47 +0100 by phpDocumentor 1.4.0a2