summaryrefslogtreecommitdiff
path: root/docu/nd/files/stupid_template_engine-php.html
diff options
context:
space:
mode:
Diffstat (limited to 'docu/nd/files/stupid_template_engine-php.html')
-rw-r--r--docu/nd/files/stupid_template_engine-php.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/docu/nd/files/stupid_template_engine-php.html b/docu/nd/files/stupid_template_engine-php.html
index 2d68e6b..1567591 100644
--- a/docu/nd/files/stupid_template_engine-php.html
+++ b/docu/nd/files/stupid_template_engine-php.html
@@ -63,17 +63,17 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
<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&rsquo;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&rsquo;s parameter) that represents the tag&rsquo;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 &lt;$mute_runtime_errors&gt;).</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&rsquo;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&rsquo;s parameter) that represents the tag&rsquo;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> (see <a href="#STECore.$fatal_error_on_missing_tag" class=LVariable id=link55 onMouseOver="ShowTip(event, 'tt23', 'link55')" onMouseOut="HideTip('tt23')">$fatal_error_on_missing_tag</a>.</p><h4 class=CHeading>Returns</h4><p>The output of the tag or, if a <a href="#RuntimeError" class=LClass id=link56 onMouseOver="ShowTip(event, 'tt21', 'link56')" onMouseOut="HideTip('tt21')">RuntimeError</a> was thrown, the appropiate result (see &lt;$mute_runtime_errors&gt;).</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.&nbsp; 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.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.&nbsp; The huge difference to <a href="#STECore.load" class=LFunction id=link57 onMouseOver="ShowTip(event, 'tt15', 'link57')" 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>Throws</h4><ul><li>A <a href="#CantLoadTemplate" class=LClass id=link58 onMouseOver="ShowTip(event, 'tt19', 'link58')" onMouseOut="HideTip('tt19')">CantLoadTemplate</a> exception if the template could not be loaded.</li><li>A &lt;ParseCompileError&gt; if the template could not be parsed or transcompiled.</li><li>A <a href="#FatalRuntimeError" class=LClass id=link59 onMouseOver="ShowTip(event, 'tt22', 'link59')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> if a tag threw it or if a tag was not found and <a href="#STECore.$fatal_error_on_missing_tag" class=LVariable id=link60 onMouseOver="ShowTip(event, 'tt23', 'link60')" onMouseOut="HideTip('tt23')">$fatal_error_on_missing_tag</a> is true.</li><li>Might also throw different exceptions, if a external tag threw it (but they should use <a href="#RuntimeError" class=LClass id=link61 onMouseOver="ShowTip(event, 'tt21', 'link61')" onMouseOut="HideTip('tt21')">RuntimeError</a> or <a href="#FatalRuntimeError" class=LClass id=link62 onMouseOver="ShowTip(event, 'tt22', 'link62')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> to make it possible for STE to handle them correctly).</li></ul><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 &amp;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.&nbsp; 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?&nbsp; 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.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 &amp;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.&nbsp; 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?&nbsp; 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=link63 onMouseOver="ShowTip(event, 'tt21', 'link63')" 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.&nbsp; 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.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.&nbsp; 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=link64 onMouseOver="ShowTip(event, 'tt21', 'link64')" 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.&nbsp; 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.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.&nbsp; 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=link65 onMouseOver="ShowTip(event, 'tt21', 'link65')" 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>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</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.&nbsp; This can be useful to load custom tags that are programmed in STE T/PL.&nbsp; 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.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>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td></tr><tr><td></td><td class=PParameter nowrap>$quiet</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</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=link66 onMouseOver="ShowTip(event, 'tt11', 'link66')" 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.&nbsp; This can be useful to load custom tags that are programmed in STE T/PL.&nbsp; Default: false.</td></tr></table><h4 class=CHeading>Throws</h4><ul><li>A <a href="#CantLoadTemplate" class=LClass id=link67 onMouseOver="ShowTip(event, 'tt19', 'link67')" onMouseOut="HideTip('tt19')">CantLoadTemplate</a> exception if the template could not be loaded.</li><li>A &lt;ParseCompileError&gt; if the template could not be parsed or transcompiled.</li><li>A <a href="#FatalRuntimeError" class=LClass id=link68 onMouseOver="ShowTip(event, 'tt22', 'link68')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> if a tag threw it or if a tag was not found and <a href="#STECore.$fatal_error_on_missing_tag" class=LVariable id=link69 onMouseOver="ShowTip(event, 'tt23', 'link69')" onMouseOut="HideTip('tt23')">$fatal_error_on_missing_tag</a> is true.</li><li>Might also throw different exceptions, if a external tag threw it (but they should use <a href="#RuntimeError" class=LClass id=link70 onMouseOver="ShowTip(event, 'tt21', 'link70')" onMouseOut="HideTip('tt21')">RuntimeError</a> or <a href="#FatalRuntimeError" class=LClass id=link71 onMouseOver="ShowTip(event, 'tt22', 'link71')" onMouseOut="HideTip('tt22')">FatalRuntimeError</a> to make it possible for STE to handle them correctly).</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>