diff options
Diffstat (limited to 'docu/nd/files/stupid_template_engine-php.html')
-rw-r--r-- | docu/nd/files/stupid_template_engine-php.html | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/docu/nd/files/stupid_template_engine-php.html b/docu/nd/files/stupid_template_engine-php.html index b7b8ea3..2d68e6b 100644 --- a/docu/nd/files/stupid_template_engine-php.html +++ b/docu/nd/files/stupid_template_engine-php.html @@ -11,61 +11,69 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV -<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="stupid_template_engine.php"></a>stupid_template_engine.php</h1><div class=CBody><p>The implementation of the Stupid Template Engine.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#stupid_template_engine.php" >stupid_template_engine.php</a></td><td class=SDescription>The implementation of the Stupid Template Engine.</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>This file is licensed under the MIT/X11 License. </td></tr><tr class="SClass"><td class=SEntry><a href="#ste" >ste</a></td><td class=SDescription>Everything in this file is in this namespace.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#ste.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ste.precompile" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">precompile</a></td><td class=SDescription>Precompiling STE T/PL templates. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#ste.parse" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">parse</a></td><td class=SDescription>Parsing a STE T/PL template. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ste.transcompile" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">transcompile</a></td><td class=SDescription>Transcompiles an abstract syntax tree to PHP. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#ste.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#ste.Template_modes" >Template modes</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#StorageAccess" >StorageAccess</a></td><td class=SDescription>An interface. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#StorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#StorageAccess.load" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">load</a></td><td class=SDescription>Loading a template.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#StorageAccess.save" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">save</a></td><td class=SDescription>Saves a template.</td></tr><tr class="SClass"><td class=SEntry><a href="#FilesystemStorageAccess" >FilesystemStorageAccess</a></td><td class=SDescription>The default <a href="#StorageAccess" class=LClass id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">StorageAccess</a> implementation for loading / saving templates into a directory structure.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#FilesystemStorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#FilesystemStorageAccess.__construct" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">__construct</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#STECore" >STECore</a></td><td class=SDescription>The Core of STE</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#STECore.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#STECore.Public_variables" >Public variables</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#STECore.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.__construct" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">__construct</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.register_tag" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">register_tag</a></td><td class=SDescription>Register a custom tag.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.call_tag" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">call_tag</a></td><td class=SDescription>Calling a custom tag (builtin ones can not be called)</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.exectemplate" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">exectemplate</a></td><td class=SDescription>Executes a template and returns the result. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.get_var_reference" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">get_var_reference</a></td><td class=SDescription>Get a reference to a template variable using a variable name. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.set_var_by_name" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">set_var_by_name</a></td><td class=SDescription>Set a template variable by its name. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.get_var_by_name" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">get_var_by_name</a></td><td class=SDescription>Get a template variable by its name. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.load" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">load</a></td><td class=SDescription>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link16 onMouseOver="ShowTip(event, 'tt11', 'link16')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.evalbool" id=link17 onMouseOver="ShowTip(event, 'tt16', 'link17')" onMouseOut="HideTip('tt16')">evalbool</a></td><td class=SDescription>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> +<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="stupid_template_engine.php"></a>stupid_template_engine.php</h1><div class=CBody><p>The implementation of the Stupid Template Engine.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#stupid_template_engine.php" >stupid_template_engine.php</a></td><td class=SDescription>The implementation of the Stupid Template Engine.</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>This file is licensed under the MIT/X11 License. </td></tr><tr class="SClass"><td class=SEntry><a href="#ste" >ste</a></td><td class=SDescription>Everything in this file is in this namespace.</td></tr><tr class="SClass"><td class=SEntry><a href="#RuntimeError" >RuntimeError</a></td><td class=SDescription>An Exception that a tag can throw, if a non-fatal runtime error occurred. </td></tr><tr class="SClass"><td class=SEntry><a href="#FatalRuntimeError" >FatalRuntimeError</a></td><td class=SDescription>An Exception a tag can throw, if a fatal (irreparable) runtime error occurred. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#FatalRuntimeError.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#FatalRuntimeError.precompile" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">precompile</a></td><td class=SDescription>Precompiling STE T/PL templates. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#FatalRuntimeError.parse" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">parse</a></td><td class=SDescription>Parsing a STE T/PL template. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#FatalRuntimeError.transcompile" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">transcompile</a></td><td class=SDescription>Transcompiles an abstract syntax tree to PHP. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#FatalRuntimeError.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#FatalRuntimeError.Template_modes" >Template modes</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#CantLoadTemplate" >CantLoadTemplate</a></td><td class=SDescription>An exception that a <a href="#StorageAccess" class=LClass id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation can throw, if it is unable to load a template.</td></tr><tr class="SClass"><td class=SEntry><a href="#CantSaveTemplate" >CantSaveTemplate</a></td><td class=SDescription>An exception that a <a href="#StorageAccess" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation can throw, if it is unable to save a template.</td></tr><tr class="SClass"><td class=SEntry><a href="#StorageAccess" >StorageAccess</a></td><td class=SDescription>An interface. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#StorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#StorageAccess.load" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">load</a></td><td class=SDescription>Loading a template.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#StorageAccess.save" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">save</a></td><td class=SDescription>Saves a template.</td></tr><tr class="SClass"><td class=SEntry><a href="#FilesystemStorageAccess" >FilesystemStorageAccess</a></td><td class=SDescription>The default <a href="#StorageAccess" class=LClass id=link8 onMouseOver="ShowTip(event, 'tt4', 'link8')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation for loading / saving templates into a directory structure.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#FilesystemStorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#FilesystemStorageAccess.__construct" id=link9 onMouseOver="ShowTip(event, 'tt7', 'link9')" onMouseOut="HideTip('tt7')">__construct</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#STECore" >STECore</a></td><td class=SDescription>The Core of STE</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#STECore.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#STECore.Public_variables" >Public variables</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#STECore.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.__construct" id=link10 onMouseOver="ShowTip(event, 'tt8', 'link10')" onMouseOut="HideTip('tt8')">__construct</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.register_tag" id=link11 onMouseOver="ShowTip(event, 'tt9', 'link11')" onMouseOut="HideTip('tt9')">register_tag</a></td><td class=SDescription>Register a custom tag.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.call_tag" id=link12 onMouseOver="ShowTip(event, 'tt10', 'link12')" onMouseOut="HideTip('tt10')">call_tag</a></td><td class=SDescription>Calling a custom tag (builtin ones can not be called)</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.exectemplate" id=link13 onMouseOver="ShowTip(event, 'tt11', 'link13')" onMouseOut="HideTip('tt11')">exectemplate</a></td><td class=SDescription>Executes a template and returns the result. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.get_var_reference" id=link14 onMouseOver="ShowTip(event, 'tt12', 'link14')" onMouseOut="HideTip('tt12')">get_var_reference</a></td><td class=SDescription>Get a reference to a template variable using a variable name. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.set_var_by_name" id=link15 onMouseOver="ShowTip(event, 'tt13', 'link15')" onMouseOut="HideTip('tt13')">set_var_by_name</a></td><td class=SDescription>Set a template variable by its name. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.get_var_by_name" id=link16 onMouseOver="ShowTip(event, 'tt14', 'link16')" onMouseOut="HideTip('tt14')">get_var_by_name</a></td><td class=SDescription>Get a template variable by its name. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#STECore.load" id=link17 onMouseOver="ShowTip(event, 'tt15', 'link17')" onMouseOut="HideTip('tt15')">load</a></td><td class=SDescription>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link18 onMouseOver="ShowTip(event, 'tt11', 'link18')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#STECore.evalbool" id=link19 onMouseOver="ShowTip(event, 'tt16', 'link19')" onMouseOut="HideTip('tt16')">evalbool</a></td><td class=SDescription>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> <div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="License"></a>License</h3><div class=CBody><p>This file is licensed under the MIT/X11 License. See COPYING for more details.</p></div></div></div> -<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="ste"></a>ste</h2><div class=CBody><p>Everything in this file is in this namespace.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#ste.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ste.precompile" id=link18 onMouseOver="ShowTip(event, 'tt1', 'link18')" onMouseOut="HideTip('tt1')">precompile</a></td><td class=SDescription>Precompiling STE T/PL templates. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#ste.parse" id=link19 onMouseOver="ShowTip(event, 'tt2', 'link19')" onMouseOut="HideTip('tt2')">parse</a></td><td class=SDescription>Parsing a STE T/PL template. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ste.transcompile" id=link20 onMouseOver="ShowTip(event, 'tt3', 'link20')" onMouseOut="HideTip('tt3')">transcompile</a></td><td class=SDescription>Transcompiles an abstract syntax tree to PHP. </td></tr><tr class="SGroup"><td class=SEntry><a href="#ste.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent1 SMarked"><td class=SEntry><a href="#ste.Template_modes" >Template modes</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="ste"></a>ste</h2><div class=CBody><p>Everything in this file is in this namespace.</p></div></div></div> -<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ste.Functions"></a>Functions</h3></div></div> +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="RuntimeError"></a>RuntimeError</h2><div class=CBody><p>An Exception that a tag can throw, if a non-fatal runtime error occurred. By default this will return in no output at all. But if <a href="#STECore.$mute_runtime_errors" class=LVariable id=link20 onMouseOver="ShowTip(event, 'tt17', 'link20')" onMouseOut="HideTip('tt17')">STECore::$mute_runtime_errors</a> is false, this will generate a error message instead of the tag’s output.</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ste.precompile"></a>precompile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function precompile(</td><td class=PParameter nowrap>$code</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Precompiling STE T/PL templates. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$code</td><td class=CDLDescription>The input code</td></tr></table><h4 class=CHeading>Returns</h4><p>The precompiled code.</p></div></div></div> +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="FatalRuntimeError"></a>FatalRuntimeError</h2><div class=CBody><p>An Exception a tag can throw, if a fatal (irreparable) runtime error occurred. This Exception will always “bubble up” so you probably want to catch them. Remember that this exception is also in the namespace ste!</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#FatalRuntimeError.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#FatalRuntimeError.precompile" id=link21 onMouseOver="ShowTip(event, 'tt1', 'link21')" onMouseOut="HideTip('tt1')">precompile</a></td><td class=SDescription>Precompiling STE T/PL templates. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#FatalRuntimeError.parse" id=link22 onMouseOver="ShowTip(event, 'tt2', 'link22')" onMouseOut="HideTip('tt2')">parse</a></td><td class=SDescription>Parsing a STE T/PL template. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#FatalRuntimeError.transcompile" id=link23 onMouseOver="ShowTip(event, 'tt3', 'link23')" onMouseOut="HideTip('tt3')">transcompile</a></td><td class=SDescription>Transcompiles an abstract syntax tree to PHP. </td></tr><tr class="SGroup"><td class=SEntry><a href="#FatalRuntimeError.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent1 SMarked"><td class=SEntry><a href="#FatalRuntimeError.Template_modes" >Template modes</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ste.parse"></a>parse</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function parse(</td><td class=PParameter nowrap>$code,</td></tr><tr><td></td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Parsing a STE T/PL template. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$code</td><td class=CDLDescription>The STE T/PL code.</td></tr><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template.</td></tr></table><h4 class=CHeading>Returns</h4><p>An abstract syntax tree, which can be used with <a href="#ste.transcompile" class=LFunction id=link21 onMouseOver="ShowTip(event, 'tt3', 'link21')" onMouseOut="HideTip('tt3')">transcompile</a>.</p></div></div></div> +<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.Functions"></a>Functions</h3></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ste.transcompile"></a>transcompile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function transcompile(</td><td class=PParameter nowrap>$ast</td><td class=PAfterParameters nowrap>) /* Transcompile and add some boilerplate code. */</td></tr></table></td></tr></table></blockquote><p>Transcompiles an abstract syntax tree to PHP. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$ast</td><td class=CDLDescription>The abstract syntax tree to transcompile.</td></tr></table><h4 class=CHeading>Returns</h4><p>PHP code. The PHP code is an anonymous function expecting a <a href="#STECore" class=LClass id=link22 onMouseOver="ShowTip(event, 'tt17', 'link22')" onMouseOut="HideTip('tt17')">STECore</a> instance as its parameter and returns a string (everything that was not pached into a section).</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.precompile"></a>precompile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function precompile(</td><td class=PParameter nowrap>$code</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Precompiling STE T/PL templates. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$code</td><td class=CDLDescription>The input code</td></tr></table><h4 class=CHeading>Returns</h4><p>The precompiled code.</p></div></div></div> -<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ste.Constants"></a>Constants</h3></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.parse"></a>parse</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function parse(</td><td class=PParameter nowrap>$code,</td></tr><tr><td></td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Parsing a STE T/PL template. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$code</td><td class=CDLDescription>The STE T/PL code.</td></tr><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template.</td></tr></table><h4 class=CHeading>Returns</h4><p>An abstract syntax tree, which can be used with <a href="#FatalRuntimeError.transcompile" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt3', 'link24')" onMouseOut="HideTip('tt3')">transcompile</a>.</p></div></div></div> -<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="ste.Template_modes"></a>Template modes</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="MODE_SOURCE"></a>MODE_SOURCE</td><td class=CDLDescription>The Templates source</td></tr><tr><td class=CDLEntry><a name="MODE_TRANSCOMPILED"></a>MODE_TRANSCOMPILED</td><td class=CDLDescription>The transcompiled template</td></tr></table></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.transcompile"></a>transcompile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function transcompile(</td><td class=PParameter nowrap>$ast</td><td class=PAfterParameters nowrap>) /* Transcompile and add some boilerplate code. */</td></tr></table></td></tr></table></blockquote><p>Transcompiles an abstract syntax tree to PHP. You only need this function, if you want to manually transcompile a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$ast</td><td class=CDLDescription>The abstract syntax tree to transcompile.</td></tr></table><h4 class=CHeading>Returns</h4><p>PHP code. The PHP code is an anonymous function expecting a <a href="#STECore" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt18', 'link25')" onMouseOut="HideTip('tt18')">STECore</a> instance as its parameter and returns a string (everything that was not pached into a section).</p></div></div></div> -<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="StorageAccess"></a>StorageAccess</h2><div class=CBody><p>An interface. A StorageAccess implementation is used to access the templates from any storage. This means, that you are not limited to store the Templates inside directories, you can also use a database or something else.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#StorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#StorageAccess.load" id=link23 onMouseOver="ShowTip(event, 'tt4', 'link23')" onMouseOut="HideTip('tt4')">load</a></td><td class=SDescription>Loading a template.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#StorageAccess.save" id=link24 onMouseOver="ShowTip(event, 'tt5', 'link24')" onMouseOut="HideTip('tt5')">save</a></td><td class=SDescription>Saves a template.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> +<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.Constants"></a>Constants</h3></div></div> + +<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="FatalRuntimeError.Template_modes"></a>Template modes</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="MODE_SOURCE"></a>MODE_SOURCE</td><td class=CDLDescription>The Templates source</td></tr><tr><td class=CDLEntry><a name="MODE_TRANSCOMPILED"></a>MODE_TRANSCOMPILED</td><td class=CDLDescription>The transcompiled template</td></tr></table></div></div></div> + +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="CantLoadTemplate"></a>CantLoadTemplate</h2><div class=CBody><p>An exception that a <a href="#StorageAccess" class=LClass id=link26 onMouseOver="ShowTip(event, 'tt4', 'link26')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation can throw, if it is unable to load a template.</p></div></div></div> + +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="CantSaveTemplate"></a>CantSaveTemplate</h2><div class=CBody><p>An exception that a <a href="#StorageAccess" class=LClass id=link27 onMouseOver="ShowTip(event, 'tt4', 'link27')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation can throw, if it is unable to save a template.</p></div></div></div> + +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="StorageAccess"></a>StorageAccess</h2><div class=CBody><p>An interface. A StorageAccess implementation is used to access the templates from any storage. This means, that you are not limited to store the Templates inside directories, you can also use a database or something else.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#StorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#StorageAccess.load" id=link28 onMouseOver="ShowTip(event, 'tt5', 'link28')" onMouseOut="HideTip('tt5')">load</a></td><td class=SDescription>Loading a template.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#StorageAccess.save" id=link29 onMouseOver="ShowTip(event, 'tt6', 'link29')" onMouseOut="HideTip('tt6')">save</a></td><td class=SDescription>Saves a template.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="StorageAccess.Functions"></a>Functions</h3></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="StorageAccess.load"></a>load</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&</td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Loading a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template.</td></tr><tr><td class=CDLEntry>&$mode</td><td class=CDLDescription>Which mode is preferred? One of the <Template modes>. If <MODE_SOURCE>, the raw sourcecode is expected, if <MODE_TRANSCOMPILED> the transcompiled template <b>as a callable function</b> (expecting an <a href="#STECore" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt17', 'link25')" onMouseOut="HideTip('tt17')">STECore</a> instance as first parameter) is expected. If the transcompiled version is not available or older than the source, you can set this parameter to <MODE_SOURCE> and return the source.</td></tr></table><h4 class=CHeading>Returns</h4><p>Either the sourcecode or a callable function (first, and only parameter: an <a href="#STECore" class=LClass id=link26 onMouseOver="ShowTip(event, 'tt17', 'link26')" onMouseOut="HideTip('tt17')">STECore</a> instance).</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="StorageAccess.load"></a>load</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&</td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Loading a template.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template.</td></tr><tr><td class=CDLEntry>&$mode</td><td class=CDLDescription>Which mode is preferred? One of the <Template modes>. If <MODE_SOURCE>, the raw sourcecode is expected, if <MODE_TRANSCOMPILED> the transcompiled template <b>as a callable function</b> (expecting an <a href="#STECore" class=LClass id=link30 onMouseOver="ShowTip(event, 'tt18', 'link30')" onMouseOut="HideTip('tt18')">STECore</a> instance as first parameter) is expected. If the transcompiled version is not available or older than the source, you can set this parameter to <MODE_SOURCE> and return the source.</td></tr></table><h4 class=CHeading>Throws</h4><p>A <a href="#CantLoadTemplate" class=LClass id=link31 onMouseOver="ShowTip(event, 'tt19', 'link31')" onMouseOut="HideTip('tt19')">CantLoadTemplate</a> exception if the template could not be loaded.</p><h4 class=CHeading>Returns</h4><p>Either the sourcecode or a callable function (first, and only parameter: an <a href="#STECore" class=LClass id=link32 onMouseOver="ShowTip(event, 'tt18', 'link32')" onMouseOut="HideTip('tt18')">STECore</a> instance).</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="StorageAccess.save"></a>save</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function save(</td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameter nowrap>$data,</td></tr><tr><td></td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Saves a template.</p><h4 class=CHeading>Parameters</h4><p>$tpl -The name of the template. $data - The data to be saved. $mode - A <Template mode> constant.</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="StorageAccess.save"></a>save</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function save(</td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameter nowrap>$data,</td></tr><tr><td></td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Saves a template.</p><h4 class=CHeading>Throws</h4><p>A <a href="#CantSaveTemplate" class=LClass id=link33 onMouseOver="ShowTip(event, 'tt20', 'link33')" onMouseOut="HideTip('tt20')">CantSaveTemplate</a> exception if the template could not be saved.</p><h4 class=CHeading>Parameters</h4><p>$tpl -The name of the template. $data - The data to be saved. $mode - A <Template mode> constant.</p></div></div></div> -<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="FilesystemStorageAccess"></a>FilesystemStorageAccess</h2><div class=CBody><p>The default <a href="#StorageAccess" class=LClass id=link28 onMouseOver="ShowTip(event, 'tt6', 'link28')" onMouseOut="HideTip('tt6')">StorageAccess</a> implementation for loading / saving templates into a directory structure.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#FilesystemStorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#FilesystemStorageAccess.__construct" id=link27 onMouseOver="ShowTip(event, 'tt7', 'link27')" onMouseOut="HideTip('tt7')">__construct</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="FilesystemStorageAccess"></a>FilesystemStorageAccess</h2><div class=CBody><p>The default <a href="#StorageAccess" class=LClass id=link35 onMouseOver="ShowTip(event, 'tt4', 'link35')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation for loading / saving templates into a directory structure.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#FilesystemStorageAccess.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#FilesystemStorageAccess.__construct" id=link34 onMouseOver="ShowTip(event, 'tt7', 'link34')" onMouseOut="HideTip('tt7')">__construct</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="FilesystemStorageAccess.Functions"></a>Functions</h3></div></div> <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="FilesystemStorageAccess.__construct"></a>__construct</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$src,</td></tr><tr><td></td><td class=PParameter nowrap>$transc</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$src</td><td class=CDLDescription>The directory with the sources (Writing permissions are not mandatory, because STE does not save template sources).</td></tr><tr><td class=CDLEntry>$transc</td><td class=CDLDescription>The directory with the transcompiled templates (the PHP instance / the HTTP Server needs writing permissions to this directory).</td></tr></table></div></div></div> -<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="STECore"></a>STECore</h2><div class=CBody><p>The Core of STE</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#STECore.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#STECore.Public_variables" >Public variables</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#STECore.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.__construct" id=link29 onMouseOver="ShowTip(event, 'tt8', 'link29')" onMouseOut="HideTip('tt8')">__construct</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.register_tag" id=link30 onMouseOver="ShowTip(event, 'tt9', 'link30')" onMouseOut="HideTip('tt9')">register_tag</a></td><td class=SDescription>Register a custom tag.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.call_tag" id=link31 onMouseOver="ShowTip(event, 'tt10', 'link31')" onMouseOut="HideTip('tt10')">call_tag</a></td><td class=SDescription>Calling a custom tag (builtin ones can not be called)</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.exectemplate" id=link32 onMouseOver="ShowTip(event, 'tt11', 'link32')" onMouseOut="HideTip('tt11')">exectemplate</a></td><td class=SDescription>Executes a template and returns the result. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.get_var_reference" id=link33 onMouseOver="ShowTip(event, 'tt12', 'link33')" onMouseOut="HideTip('tt12')">get_var_reference</a></td><td class=SDescription>Get a reference to a template variable using a variable name. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.set_var_by_name" id=link34 onMouseOver="ShowTip(event, 'tt13', 'link34')" onMouseOut="HideTip('tt13')">set_var_by_name</a></td><td class=SDescription>Set a template variable by its name. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.get_var_by_name" id=link35 onMouseOver="ShowTip(event, 'tt14', 'link35')" onMouseOut="HideTip('tt14')">get_var_by_name</a></td><td class=SDescription>Get a template variable by its name. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.load" id=link36 onMouseOver="ShowTip(event, 'tt15', 'link36')" onMouseOut="HideTip('tt15')">load</a></td><td class=SDescription>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt11', 'link37')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.evalbool" id=link38 onMouseOver="ShowTip(event, 'tt16', 'link38')" onMouseOut="HideTip('tt16')">evalbool</a></td><td class=SDescription>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> +<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="STECore"></a>STECore</h2><div class=CBody><p>The Core of STE</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#STECore.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#STECore.Public_variables" >Public variables</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#STECore.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.__construct" id=link36 onMouseOver="ShowTip(event, 'tt8', 'link36')" onMouseOut="HideTip('tt8')">__construct</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.register_tag" id=link37 onMouseOver="ShowTip(event, 'tt9', 'link37')" onMouseOut="HideTip('tt9')">register_tag</a></td><td class=SDescription>Register a custom tag.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.call_tag" id=link38 onMouseOver="ShowTip(event, 'tt10', 'link38')" onMouseOut="HideTip('tt10')">call_tag</a></td><td class=SDescription>Calling a custom tag (builtin ones can not be called)</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.exectemplate" id=link39 onMouseOver="ShowTip(event, 'tt11', 'link39')" onMouseOut="HideTip('tt11')">exectemplate</a></td><td class=SDescription>Executes a template and returns the result. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.get_var_reference" id=link40 onMouseOver="ShowTip(event, 'tt12', 'link40')" onMouseOut="HideTip('tt12')">get_var_reference</a></td><td class=SDescription>Get a reference to a template variable using a variable name. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.set_var_by_name" id=link41 onMouseOver="ShowTip(event, 'tt13', 'link41')" onMouseOut="HideTip('tt13')">set_var_by_name</a></td><td class=SDescription>Set a template variable by its name. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.get_var_by_name" id=link42 onMouseOver="ShowTip(event, 'tt14', 'link42')" onMouseOut="HideTip('tt14')">get_var_by_name</a></td><td class=SDescription>Get a template variable by its name. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#STECore.load" id=link43 onMouseOver="ShowTip(event, 'tt15', 'link43')" onMouseOut="HideTip('tt15')">load</a></td><td class=SDescription>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link44 onMouseOver="ShowTip(event, 'tt11', 'link44')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#STECore.evalbool" id=link45 onMouseOver="ShowTip(event, 'tt16', 'link45')" onMouseOut="HideTip('tt16')">evalbool</a></td><td class=SDescription>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div> <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="STECore.Variables"></a>Variables</h3></div></div> -<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="STECore.Public_variables"></a>Public variables</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="$blocks"></a>$blocks</td><td class=CDLDescription>Associative array of blocks (see the language definition).</td></tr><tr><td class=CDLEntry><a name="$blockorder"></a>$blockorder</td><td class=CDLDescription>The order of the blocks (an array)</td></tr><tr><td class=CDLEntry><a name="$vars"></a>$vars</td><td class=CDLDescription>Associative array of all template variables. Use this to pass data to your templates.</td></tr></table></div></div></div> +<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="STECore.Public_variables"></a>Public variables</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry><a name="$blocks"></a>$blocks</td><td class=CDLDescription>Associative array of blocks (see the language definition).</td></tr><tr><td class=CDLEntry><a name="$blockorder"></a>$blockorder</td><td class=CDLDescription>The order of the blocks (an array)</td></tr><tr><td class=CDLEntry><a name="$vars"></a>$vars</td><td class=CDLDescription>Associative array of all template variables. Use this to pass data to your templates.</td></tr><tr><td class=CDLEntry><a name="$mute_runtime_errors"></a>$mute_runtime_errors</td><td class=CDLDescription>If True (default) a <a href="#RuntimeError" class=LClass id=link46 onMouseOver="ShowTip(event, 'tt21', 'link46')" onMouseOut="HideTip('tt21')">RuntimeError</a> exception will result in no output from the tag, if False a error message will be written to output.</td></tr><tr><td class=CDLEntry><a name="$fatal_error_on_missing_tag"></a>$fatal_error_on_missing_tag</td><td class=CDLDescription>If True, STE will throw a <a href="#FatalRuntimeError" class=LClass id=link47 onMouseOver="ShowTip(event, 'tt22', 'link47')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> if a tag was called that was not registered, otherwise (default) a regular <a href="#RuntimeError" class=LClass id=link48 onMouseOver="ShowTip(event, 'tt21', 'link48')" onMouseOut="HideTip('tt21')">RuntimeError</a> will be thrown and automatically handled by STE (see <$mute_runtime_errors>).</td></tr></table></div></div></div> <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="STECore.Functions"></a>Functions</h3></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.__construct"></a>__construct</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$storage_access</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$storage_access</td><td class=CDLDescription>An Instance of a <a href="#StorageAccess" class=LClass id=link39 onMouseOver="ShowTip(event, 'tt6', 'link39')" onMouseOut="HideTip('tt6')">StorageAccess</a> implementation.</td></tr></table></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.__construct"></a>__construct</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$storage_access</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$storage_access</td><td class=CDLDescription>An Instance of a <a href="#StorageAccess" class=LClass id=link49 onMouseOver="ShowTip(event, 'tt4', 'link49')" onMouseOut="HideTip('tt4')">StorageAccess</a> implementation.</td></tr></table></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.register_tag"></a>register_tag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function register_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$callback</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Register a custom tag.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The name of the tag.</td></tr><tr><td class=CDLEntry>$callback</td><td class=CDLDescription>A callable function (This must tage three parameters: The <a href="#STECore" class=LClass id=link40 onMouseOver="ShowTip(event, 'tt17', 'link40')" onMouseOut="HideTip('tt17')">STECore</a> instance, an associative array of parameters, and a function representing the tags content(This expects the <a href="#STECore" class=LClass id=link41 onMouseOver="ShowTip(event, 'tt17', 'link41')" onMouseOut="HideTip('tt17')">STECore</a> instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the <a href="#STECore" class=LClass id=link42 onMouseOver="ShowTip(event, 'tt17', 'link42')" onMouseOut="HideTip('tt17')">STECore</a> instance as a parameter)).</td></tr></table></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.register_tag"></a>register_tag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function register_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$callback</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Register a custom tag.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The name of the tag.</td></tr><tr><td class=CDLEntry>$callback</td><td class=CDLDescription>A callable function (This must tage three parameters: The <a href="#STECore" class=LClass id=link50 onMouseOver="ShowTip(event, 'tt18', 'link50')" onMouseOut="HideTip('tt18')">STECore</a> instance, an associative array of parameters, and a function representing the tags content(This expects the <a href="#STECore" class=LClass id=link51 onMouseOver="ShowTip(event, 'tt18', 'link51')" onMouseOut="HideTip('tt18')">STECore</a> instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the <a href="#STECore" class=LClass id=link52 onMouseOver="ShowTip(event, 'tt18', 'link52')" onMouseOut="HideTip('tt18')">STECore</a> instance as a parameter)).</td></tr></table><h4 class=CHeading>Throws</h4><p>An Exception if the tag could not be registered (if $callback is not callable or if $name is empty)</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.call_tag"></a>call_tag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function call_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$params,</td></tr><tr><td></td><td class=PParameter nowrap>$sub</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Calling a custom tag (builtin ones can not be called)</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The Tag’s name</td></tr><tr><td class=CDLEntry>$params</td><td class=CDLDescription>Associative array of parameters</td></tr><tr><td class=CDLEntry>$sub</td><td class=CDLDescription>A callable function (expecting an <a href="#STECore" class=LClass id=link43 onMouseOver="ShowTip(event, 'tt17', 'link43')" onMouseOut="HideTip('tt17')">STECore</a> instance as it’s parameter) that represents the tag’s content.</td></tr></table><h4 class=CHeading>Returns</h4><p>The output of the tag.</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.call_tag"></a>call_tag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function call_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$params,</td></tr><tr><td></td><td class=PParameter nowrap>$sub</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Calling a custom tag (builtin ones can not be called)</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The Tag’s name</td></tr><tr><td class=CDLEntry>$params</td><td class=CDLDescription>Associative array of parameters</td></tr><tr><td class=CDLEntry>$sub</td><td class=CDLDescription>A callable function (expecting an <a href="#STECore" class=LClass id=link53 onMouseOver="ShowTip(event, 'tt18', 'link53')" onMouseOut="HideTip('tt18')">STECore</a> instance as it’s parameter) that represents the tag’s content.</td></tr></table><h4 class=CHeading>Throws</h4><p>Might throw a <a href="#FatalRuntimeError" class=LClass id=link54 onMouseOver="ShowTip(event, 'tt22', 'link54')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a>.</p><h4 class=CHeading>Returns</h4><p>The output of the tag or, if a <a href="#RuntimeError" class=LClass id=link55 onMouseOver="ShowTip(event, 'tt21', 'link55')" onMouseOut="HideTip('tt21')">RuntimeError</a> was thrown, the appropiate result (see <$mute_runtime_errors>).</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.exectemplate"></a>exectemplate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function exectemplate(</td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes a template and returns the result. The huge difference to <a href="#STECore.load" class=LFunction id=link44 onMouseOver="ShowTip(event, 'tt15', 'link44')" onMouseOut="HideTip('tt15')">load</a> is that this function will also output all blocks.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template to execute.</td></tr></table><h4 class=CHeading>Returns</h4><p>The output of the template.</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.exectemplate"></a>exectemplate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function exectemplate(</td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes a template and returns the result. The huge difference to <a href="#STECore.load" class=LFunction id=link56 onMouseOver="ShowTip(event, 'tt15', 'link56')" onMouseOut="HideTip('tt15')">load</a> is that this function will also output all blocks.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template to execute.</td></tr></table><h4 class=CHeading>Returns</h4><p>The output of the template.</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.get_var_reference"></a>get_var_reference</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function &get_var_reference(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$create_if_not_exist</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get a reference to a template variable using a variable name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr><tr><td class=CDLEntry>$create_if_not_exist</td><td class=CDLDescription>Should the variable be created, if it does not exist? Otherwise NULL will be returned, if the variable does not exist.</td></tr></table><h4 class=CHeading>Returns</h4><p>A Reference to the variable.</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.get_var_reference"></a>get_var_reference</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function &get_var_reference(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$create_if_not_exist</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get a reference to a template variable using a variable name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr><tr><td class=CDLEntry>$create_if_not_exist</td><td class=CDLDescription>Should the variable be created, if it does not exist? Otherwise NULL will be returned, if the variable does not exist.</td></tr></table><h4 class=CHeading>Throws</h4><p><a href="#RuntimeError" class=LClass id=link57 onMouseOver="ShowTip(event, 'tt21', 'link57')" onMouseOut="HideTip('tt21')">RuntimeError</a> if the variable name can not be parsed (e.g. unbalanced brackets).</p><h4 class=CHeading>Returns</h4><p>A Reference to the variable.</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.set_var_by_name"></a>set_var_by_name</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function set_var_by_name(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$val</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Set a template variable by its name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr><tr><td class=CDLEntry>$val</td><td class=CDLDescription>The new value.</td></tr></table></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.set_var_by_name"></a>set_var_by_name</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function set_var_by_name(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$val</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Set a template variable by its name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr><tr><td class=CDLEntry>$val</td><td class=CDLDescription>The new value.</td></tr></table><h4 class=CHeading>Throws</h4><p><a href="#RuntimeError" class=LClass id=link58 onMouseOver="ShowTip(event, 'tt21', 'link58')" onMouseOut="HideTip('tt21')">RuntimeError</a> if the variable name can not be parsed (e.g. unbalanced brackets).</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.get_var_by_name"></a>get_var_by_name</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function get_var_by_name(</td><td class=PParameter nowrap>$name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get a template variable by its name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr></table><h4 class=CHeading>Returns</h4><p>The variables value.</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.get_var_by_name"></a>get_var_by_name</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function get_var_by_name(</td><td class=PParameter nowrap>$name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Get a template variable by its name. This can be used,if your custom tag takes a variable name as a parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$name</td><td class=CDLDescription>The variables name.</td></tr></table><h4 class=CHeading>Throws</h4><p><a href="#RuntimeError" class=LClass id=link59 onMouseOver="ShowTip(event, 'tt21', 'link59')" onMouseOut="HideTip('tt21')">RuntimeError</a> if the variable name can not be parsed (e.g. unbalanced brackets).</p><h4 class=CHeading>Returns</h4><p>The variables value.</p></div></div></div> -<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.load"></a>load</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameter nowrap>$tpl,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>False</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link45 onMouseOver="ShowTip(event, 'tt11', 'link45')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template to be loaded.</td></tr><tr><td class=CDLEntry>$quiet</td><td class=CDLDescription>If true, do not output anything and do notmodify the blocks. This can be useful to load custom tags that are programmed in STE T/PL. Default: false.</td></tr></table><h4 class=CHeading>Returns</h4><p>The result of the template (if $quiet == false).</p></div></div></div> +<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.load"></a>load</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameter nowrap>$tpl,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>False</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Load a template and return its result (blocks not included, use <a href="#STECore.exectemplate" class=LFunction id=link60 onMouseOver="ShowTip(event, 'tt11', 'link60')" onMouseOut="HideTip('tt11')">exectemplate</a> for this).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$tpl</td><td class=CDLDescription>The name of the template to be loaded.</td></tr><tr><td class=CDLEntry>$quiet</td><td class=CDLDescription>If true, do not output anything and do notmodify the blocks. This can be useful to load custom tags that are programmed in STE T/PL. Default: false.</td></tr></table><h4 class=CHeading>Throws</h4><ul><li>A <a href="#FatalRuntimeError" class=LClass id=link61 onMouseOver="ShowTip(event, 'tt22', 'link61')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> if a tag threw it or, if <a href="#STECore.$fatal_error_on_missing_tag" class=LVariable id=link62 onMouseOver="ShowTip(event, 'tt23', 'link62')" onMouseOut="HideTip('tt23')">$fatal_error_on_missing_tag</a> is True, a non-existant tag was called.</li></ul><h4 class=CHeading>Returns</h4><p>The result of the template (if $quiet == false).</p></div></div></div> <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="STECore.evalbool"></a>evalbool</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function evalbool(</td><td class=PParameter nowrap>$txt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$txt</td><td class=CDLDescription>The text to test.</td></tr></table><h4 class=CHeading>Returns</h4><p>true/false.</p></div></div></div> @@ -82,7 +90,7 @@ var searchPanel = new SearchPanel("searchPanel", "HTML", "../search"); <!--START_ND_TOOLTIPS--> -<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function precompile(</td><td class=PParameter nowrap>$code</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Precompiling STE T/PL templates. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function parse(</td><td class=PParameter nowrap>$code,</td></tr><tr><td></td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Parsing a STE T/PL template. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function transcompile(</td><td class=PParameter nowrap>$ast</td><td class=PAfterParameters nowrap>) /* Transcompile and add some boilerplate code. */</td></tr></table></td></tr></table></blockquote>Transcompiles an abstract syntax tree to PHP. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&</td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Loading a template.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function save(</td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameter nowrap>$data,</td></tr><tr><td></td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Saves a template.</div></div><div class=CToolTip id="tt6"><div class=CClass>An interface. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$src,</td></tr><tr><td></td><td class=PParameter nowrap>$transc</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$storage_access</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function register_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$callback</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Register a custom tag.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function call_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$params,</td></tr><tr><td></td><td class=PParameter nowrap>$sub</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Calling a custom tag (builtin ones can not be called)</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function exectemplate(</td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Executes a template and returns the result. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function &get_var_reference(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$create_if_not_exist</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get a reference to a template variable using a variable name. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function set_var_by_name(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$val</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Set a template variable by its name. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function get_var_by_name(</td><td class=PParameter nowrap>$name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get a template variable by its name. </div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameter nowrap>$tpl,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>False</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Load a template and return its result (blocks not included, use exectemplate for this).</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function evalbool(</td><td class=PParameter nowrap>$txt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</div></div><div class=CToolTip id="tt17"><div class=CClass>The Core of STE</div></div><!--END_ND_TOOLTIPS--> +<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function precompile(</td><td class=PParameter nowrap>$code</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Precompiling STE T/PL templates. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function parse(</td><td class=PParameter nowrap>$code,</td></tr><tr><td></td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Parsing a STE T/PL template. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function transcompile(</td><td class=PParameter nowrap>$ast</td><td class=PAfterParameters nowrap>) /* Transcompile and add some boilerplate code. */</td></tr></table></td></tr></table></blockquote>Transcompiles an abstract syntax tree to PHP. </div></div><div class=CToolTip id="tt4"><div class=CClass>An interface. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&</td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Loading a template.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function save(</td><td class=PParameter nowrap>$tpl,</td></tr><tr><td></td><td class=PParameter nowrap>$data,</td></tr><tr><td></td><td class=PParameter nowrap>$mode</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Saves a template.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$src,</td></tr><tr><td></td><td class=PParameter nowrap>$transc</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function __construct(</td><td class=PParameter nowrap>$storage_access</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function register_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$callback</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Register a custom tag.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function call_tag(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$params,</td></tr><tr><td></td><td class=PParameter nowrap>$sub</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Calling a custom tag (builtin ones can not be called)</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function exectemplate(</td><td class=PParameter nowrap>$tpl</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Executes a template and returns the result. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function &get_var_reference(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$create_if_not_exist</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get a reference to a template variable using a variable name. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function set_var_by_name(</td><td class=PParameter nowrap>$name,</td></tr><tr><td></td><td class=PParameter nowrap>$val</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Set a template variable by its name. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function get_var_by_name(</td><td class=PParameter nowrap>$name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Get a template variable by its name. </div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function load(</td><td class=PParameter nowrap>$tpl,</td><td class=PDefaultValuePrefix> </td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix> = </td><td class=PDefaultValue width=100%>False</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Load a template and return its result (blocks not included, use exectemplate for this).</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function evalbool(</td><td class=PParameter nowrap>$txt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Test, if a text represents false (an empty / only whitespace text) or true (everything else).</div></div><div class=CToolTip id="tt17"><div class=CVariable>If True (default) a RuntimeError exception will result in no output from the tag, if False a error message will be written to output.</div></div><div class=CToolTip id="tt18"><div class=CClass>The Core of STE</div></div><div class=CToolTip id="tt19"><div class=CClass>An exception that a StorageAccess implementation can throw, if it is unable to load a template.</div></div><div class=CToolTip id="tt20"><div class=CClass>An exception that a StorageAccess implementation can throw, if it is unable to save a template.</div></div><div class=CToolTip id="tt21"><div class=CClass>An Exception that a tag can throw, if a non-fatal runtime error occurred. </div></div><div class=CToolTip id="tt22"><div class=CClass>An Exception a tag can throw, if a fatal (irreparable) runtime error occurred. </div></div><div class=CToolTip id="tt23"><div class=CVariable>If True, STE will throw a FatalRuntimeError if a tag was called that was not registered, otherwise (default) a regular RuntimeError will be thrown and automatically handled by STE (see <$mute_runtime_errors>).</div></div><!--END_ND_TOOLTIPS--> |