Location: PHPKode > projects > SithTemplate > SithTemplate-1.1/docs/html/class_template_compiler_ex.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SithTemplate: TemplateCompilerEx Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<h1>TemplateCompilerEx Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="TemplateCompilerEx" -->
<p>Primary compiler driver.  
<a href="#_details">More...</a></p>

<p><a href="class_template_compiler_ex-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a1e3e1ada9beabf25c6ae30b2978b44c2">__construct</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a1e3e1ada9beabf25c6ae30b2978b44c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a8d7a65c59cb37d96d9ebc5c655a8a1e7">reset</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets compiler to pristine state, and loads plugins specified in <code>'loadPlugins'</code> setting.  <a href="#a8d7a65c59cb37d96d9ebc5c655a8a1e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a13570ae4a6d834431eeb3c84a5051ac3">compile</a> (<a class="el" href="interface_i_template_i_o_driver.html">ITemplateIODriver</a> $io, $template)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compiles given template into output package.  <a href="#a13570ae4a6d834431eeb3c84a5051ac3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a91899408f7ddf3173a8932bb8277aad7">handleChildren</a> (array &amp;$children)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates code from given node's children.  <a href="#a91899408f7ddf3173a8932bb8277aad7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a616eb81be4f686387ecd3f778eca26a5">createBlock</a> ($block, <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates code block from raw node.  <a href="#a616eb81be4f686387ecd3f778eca26a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a773e98ffac99fdbe9f8934768f840d3c">handleNode</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates code from given node.  <a href="#a773e98ffac99fdbe9f8934768f840d3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a8efc4fef1f377e69631fe3de4c2033e3">parseVariableExpression</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $variable)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses variable expression, and creates runtime PHP access code.  <a href="#a8efc4fef1f377e69631fe3de4c2033e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a0e954efa4b344518798797fe3bc6dd14">parseFilterChain</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $filterExpr, $code)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles filter chains.  <a href="#a0e954efa4b344518798797fe3bc6dd14"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a8f7f10bdd17ee4be906b39cff3f0d13d">raise</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $message, $code)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises an error, appending "(in template &lt;file&gt; somewhere around line &lt;line&gt;)" using given node.  <a href="#a8f7f10bdd17ee4be906b39cff3f0d13d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#af8bc3411f0f8bcfbd153a8d56f0ae2e7">raiseIf</a> ($cond, <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $message, $code)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shorthand for conditional call to <a class="el" href="class_template_compiler_ex.html#a8f7f10bdd17ee4be906b39cff3f0d13d">TemplateCompilerEx::raise</a>.  <a href="#af8bc3411f0f8bcfbd153a8d56f0ae2e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a9ce1b5f9a87d8fdbadfad18bb440efff">findAlternativeBranch</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $tag)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to find and isolate alternative branch of given node, starting with given inline tag.  <a href="#a9ce1b5f9a87d8fdbadfad18bb440efff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a0cee437cbd376a2ad926de8b745e120c">generateUniqueBlock</a> ($idPrefix, $blockPrefix= 'custom:', $keyLength=5)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates prefixed block name that is guaranteed to be unique in current template.  <a href="#a0cee437cbd376a2ad926de8b745e120c"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a7436ce4d99eb25b14012d0fea3329545">$settings</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Current settings (reference to <a class="el" href="class_template_environ.html#a1a6916c9094781e70523b3ed7ba20b68">TemplateEnviron::$settings</a>).  <a href="#a7436ce4d99eb25b14012d0fea3329545"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ac6a93435059bcde30df1f24bfbfa53e3">$plugins</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registry of available plugins.  <a href="#ac6a93435059bcde30df1f24bfbfa53e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ae1e96f5d9cdab5a8cef660e9bd0347c1">$loadedPlugins</a> = array()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registry of loaded plugins (per-template).  <a href="#ae1e96f5d9cdab5a8cef660e9bd0347c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a6c58447a001891500c54f1e9afc30b20">$blocks</a> = array()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Already constructed code blocks.  <a href="#a6c58447a001891500c54f1e9afc30b20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#aa33edba89e0e64230b47973bbf33ef4e">$metadata</a> = array()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Template's metadata.  <a href="#aa33edba89e0e64230b47973bbf33ef4e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a47169b58844fe3ddabd63f7d6af5067d">$className</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Template's classname.  <a href="#a47169b58844fe3ddabd63f7d6af5067d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a8c314644ad54b574e55cce1e56bf5d33">createAST</a> (&amp;$tpl)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns an Abstract Syntax Tree of given template.  <a href="#a8c314644ad54b574e55cce1e56bf5d33"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a2138fe87678a9a13b2d6f7da426a7459">parserGetNextToken</a> (array &amp;$tokens)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches next token from given stream, preprocesses it, and stores it in <a class="el" href="class_template_compiler_ex.html#a96c1fa9a15fb7c1a36a3a212073f97f4">TemplateCompilerEx::$parserCurrentToken</a>.  <a href="#a2138fe87678a9a13b2d6f7da426a7459"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#adb1366c4bf94900c7b8e765caf1d43a6">parserEncounteredEndTag</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $tag, $type)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the parser has encountered ending tag with given name.  <a href="#adb1366c4bf94900c7b8e765caf1d43a6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ac14ed87a62f7b5a59b0e9fe5ce72b4b6">createNodeFromToken</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts current token's array into the node, and adds it to given node's children.  <a href="#ac14ed87a62f7b5a59b0e9fe5ce72b4b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a9cc09b0d1f776e7f4361e9e41dd3bb10">parseTokenStream</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, array &amp;$tokens, $parseUntil=null, $blockTagType=null)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses token stream until it runs out of tokens, or when it encounters given tag name.  <a href="#a9cc09b0d1f776e7f4361e9e41dd3bb10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a3f16537377363532ad1d4fd33b6a4fca">generateCode</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs blocks and generates code for the entire AST.  <a href="#a3f16537377363532ad1d4fd33b6a4fca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#af0951cb966c81753464771dfaeffa625">handleTag</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles <code>'blockTag'</code> and 'inlineTag' nodes.  <a href="#af0951cb966c81753464771dfaeffa625"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ad4a05c2ff0b4e3ae9ee530780dc129b1">handleVariable</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles <code>'var'</code> node.  <a href="#ad4a05c2ff0b4e3ae9ee530780dc129b1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a9e9d99501cd4def7eb25dc93cbef94b5">generateVariableAST</a> ($variable)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates syntax tree (using nested arrays ATM) from given variable expression.  <a href="#a9e9d99501cd4def7eb25dc93cbef94b5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#af68b6944da2fc99dfda0c7a89f11656d">generateVariableCode</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, &amp;$ast)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively parses variable AST, and generates PHP access code.  <a href="#af68b6944da2fc99dfda0c7a89f11656d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#aa45b715a26c3bd45064f4eee890c1dad">commonVerifyElement</a> (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, $element, &amp;$name, array &amp;$args)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Verifies correctness of given element.  <a href="#aa45b715a26c3bd45064f4eee890c1dad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a49ac9c78629669903684589ebcd76033">handleLoadBuiltin</a> (<a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> $compiler, <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, &amp;$tag, array &amp;$args)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler for <code>load</code> built-in tag.  <a href="#a49ac9c78629669903684589ebcd76033"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ac5ba453fe0497c6a97e01b3ecc7b9c30">handleCommentBuiltin</a> (<a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> $compiler, <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $node, &amp;$tag, array &amp;$args)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler for <code>comment</code> built-in tag.  <a href="#ac5ba453fe0497c6a97e01b3ecc7b9c30"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#adb76060dfb9e369b12ee21bea4a51b8d">runHooks</a> ($hookPoint, array $args)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs handlers associated with given hook-point.  <a href="#adb76060dfb9e369b12ee21bea4a51b8d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a96c1fa9a15fb7c1a36a3a212073f97f4">$parserCurrentToken</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Currently processed token.  <a href="#a96c1fa9a15fb7c1a36a3a212073f97f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#a04c4c26c3f5b84a7f2743fd6253fbce9">$parserCurrentLine</a> = 1</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Currently processed line (approx).  <a href="#a04c4c26c3f5b84a7f2743fd6253fbce9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#af3d5cc74f7c0cc06676b50a5efe95112">$parserCurrentFile</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Currently processed template.  <a href="#af3d5cc74f7c0cc06676b50a5efe95112"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_compiler_ex.html#ab61b2762e9cea921fd26a4153067f983">$parserTokenRegexp</a> = '~(\{\%.*?\%\})|(\{\{.*?\}\})|(\{\#.*?\#\})~u'</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Regular expression used to split template into tokens.  <a href="#ab61b2762e9cea921fd26a4153067f983"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Primary compiler driver. </p>
<p>It's responsible for creating the AST, and generating the code.</p>
<p>Warning, large strings and heavy recursion ahead. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00029">29</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1e3e1ada9beabf25c6ae30b2978b44c2"></a><!-- doxytag: member="TemplateCompilerEx::__construct" ref="a1e3e1ada9beabf25c6ae30b2978b44c2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::__construct </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00082">82</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8d7a65c59cb37d96d9ebc5c655a8a1e7"></a><!-- doxytag: member="TemplateCompilerEx::reset" ref="a8d7a65c59cb37d96d9ebc5c655a8a1e7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::reset </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Resets compiler to pristine state, and loads plugins specified in <code>'loadPlugins'</code> setting. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00102">102</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00117">compile()</a>.</p>

</div>
</div>
<a class="anchor" id="a13570ae4a6d834431eeb3c84a5051ac3"></a><!-- doxytag: member="TemplateCompilerEx::compile" ref="a13570ae4a6d834431eeb3c84a5051ac3" args="(ITemplateIODriver $io, $template)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::compile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_i_template_i_o_driver.html">ITemplateIODriver</a> $&#160;</td>
          <td class="paramname"> <em>io</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>template</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compiles given template into output package. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$io</td><td>Used I/O driver </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$template</td><td>Template name </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00117">117</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="interface_i_template_i_o_driver.html#a4422ce31a10074ea6af13594efd757b1">ITemplateIODriver::className()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00174">createAST()</a>, <a class="el" href="_error_8php_source.html#l00032">TemplateError::E_IO_LOAD_FAILURE</a>, <a class="el" href="_error_8php_source.html#l00037">TemplateError::E_IO_SAVE_FAILURE</a>, <a class="el" href="_compiler_ex_8php_source.html#l00317">generateCode()</a>, <a class="el" href="interface_i_template_i_o_driver.html#a58d4f66a849626b7341eafeb3f456c03">ITemplateIODriver::loadTemplate()</a>, <a class="el" href="_utils_8php_source.html#l00153">TemplateUtils::parseIODSN()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00102">reset()</a>, <a class="el" href="interface_i_template_i_o_driver.html#a09fcd13602951d6617d9af68118ef851">ITemplateIODriver::saveMetadata()</a>, and <a class="el" href="interface_i_template_i_o_driver.html#ace0d5330b5b82578b4d3a5021eb1cdd7">ITemplateIODriver::saveTemplate()</a>.</p>

<p>Referenced by <a class="el" href="_environment_8php_source.html#l00438">TemplateEnviron::compile()</a>.</p>

</div>
</div>
<a class="anchor" id="a8c314644ad54b574e55cce1e56bf5d33"></a><!-- doxytag: member="TemplateCompilerEx::createAST" ref="a8c314644ad54b574e55cce1e56bf5d33" args="(&amp;$tpl)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::createAST </td>
          <td>(</td>
          <td class="paramtype">&amp;$&#160;</td>
          <td class="paramname"> <em>tpl</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates and returns an Abstract Syntax Tree of given template. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$tpl</td><td>Source template to parse </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Root node of the constructed AST </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_template_node_ex.html" title="Class-container for AST nodes.">TemplateNodeEx</a> </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00174">174</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_compiler_ex_8php_source.html#l00274">parseTokenStream()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00117">compile()</a>.</p>

</div>
</div>
<a class="anchor" id="a2138fe87678a9a13b2d6f7da426a7459"></a><!-- doxytag: member="TemplateCompilerEx::parserGetNextToken" ref="a2138fe87678a9a13b2d6f7da426a7459" args="(array &amp;$tokens)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::parserGetNextToken </td>
          <td>(</td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>tokens</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Fetches next token from given stream, preprocesses it, and stores it in <a class="el" href="class_template_compiler_ex.html#a96c1fa9a15fb7c1a36a3a212073f97f4">TemplateCompilerEx::$parserCurrentToken</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">$tokens</td><td>Token stream (array of tokens) </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">false</td><td>When there is no more tokens in the stream </td></tr>
    <tr><td class="paramname">true</td><td>Otherwise </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00191">191</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00057">TemplateUtils::split()</a>, and <a class="el" href="_utils_8php_source.html#l00079">TemplateUtils::splitEscaped()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00274">parseTokenStream()</a>.</p>

</div>
</div>
<a class="anchor" id="adb1366c4bf94900c7b8e765caf1d43a6"></a><!-- doxytag: member="TemplateCompilerEx::parserEncounteredEndTag" ref="adb1366c4bf94900c7b8e765caf1d43a6" args="(TemplateNodeEx $node, $tag, $type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::parserEncounteredEndTag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks whether the parser has encountered ending tag with given name. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Currently processed node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$tag</td><td>Tag name to look for ('end' is automatically prepended) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$type</td><td>Tag type - if <code>ignore</code>, then invalid ending tags will be ignored </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">false</td><td>When <code>$tag</code> is <code>null</code>, current token's type is not <code>'tag'</code> or parser has not encountered the tag yet </td></tr>
    <tr><td class="paramname">true</td><td>When the tag has been found </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00235">235</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00058">TemplateError::E_INVALID_SYNTAX</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00274">parseTokenStream()</a>.</p>

</div>
</div>
<a class="anchor" id="ac14ed87a62f7b5a59b0e9fe5ce72b4b6"></a><!-- doxytag: member="TemplateCompilerEx::createNodeFromToken" ref="ac14ed87a62f7b5a59b0e9fe5ce72b4b6" args="(TemplateNodeEx $node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::createNodeFromToken </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts current token's array into the node, and adds it to given node's children. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">$node</td><td>Node to append child to </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00261">261</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_compiler_ex_8php_source.html#l00838">TemplateNodeEx::addChild()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00274">parseTokenStream()</a>.</p>

</div>
</div>
<a class="anchor" id="a9cc09b0d1f776e7f4361e9e41dd3bb10"></a><!-- doxytag: member="TemplateCompilerEx::parseTokenStream" ref="a9cc09b0d1f776e7f4361e9e41dd3bb10" args="(TemplateNodeEx $node, array &amp;$tokens, $parseUntil=null, $blockTagType=null)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::parseTokenStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>tokens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>parseUntil</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>blockTagType</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parses token stream until it runs out of tokens, or when it encounters given tag name. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">$node</td><td>Currently processed node, newly constructed children will be appended to it </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">$tokens</td><td>Token stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$parseUntil</td><td>If not null, then parser will halt when it encounters tag with that name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$blockTagType</td><td>Type of the block tag (either <code>block</code> or <code>ignore</code>) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00274">274</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_compiler_ex_8php_source.html#l00261">createNodeFromToken()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00235">parserEncounteredEndTag()</a>, and <a class="el" href="_compiler_ex_8php_source.html#l00191">parserGetNextToken()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00174">createAST()</a>.</p>

</div>
</div>
<a class="anchor" id="a3f16537377363532ad1d4fd33b6a4fca"></a><!-- doxytag: member="TemplateCompilerEx::generateCode" ref="a3f16537377363532ad1d4fd33b6a4fca" args="(TemplateNodeEx $root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::generateCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>root</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs blocks and generates code for the entire AST. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$root</td><td>Root node of the AST </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array of the constructed code blocks </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Is it needed, or maybe <a class="el" href="class_template_compiler_ex.html#a13570ae4a6d834431eeb3c84a5051ac3">TemplateCompilerEx::compile</a> should do it? </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00317">317</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_compiler_ex_8php_source.html#l00345">createBlock()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00117">compile()</a>.</p>

</div>
</div>
<a class="anchor" id="a91899408f7ddf3173a8932bb8277aad7"></a><!-- doxytag: member="TemplateCompilerEx::handleChildren" ref="a91899408f7ddf3173a8932bb8277aad7" args="(array &amp;$children)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleChildren </td>
          <td>(</td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>children</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generates code from given node's children. </p>
<p>Accepts array instead of <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> for greater flexibility.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$children</td><td>Array to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Code as string </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00330">330</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_compiler_ex_8php_source.html#l00356">handleNode()</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01321">TemplateStdLibExPlugin::commonIfEqual()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00799">TemplateStdLibExPlugin::handleTAutoEscape()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01300">TemplateStdLibExPlugin::handleTIf()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01383">TemplateStdLibExPlugin::handleTSpaceless()</a>.</p>

</div>
</div>
<a class="anchor" id="a616eb81be4f686387ecd3f778eca26a5"></a><!-- doxytag: member="TemplateCompilerEx::createBlock" ref="a616eb81be4f686387ecd3f778eca26a5" args="($block, TemplateNodeEx $node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::createBlock </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates code block from raw node. </p>
<p>Part of exposed compiler API.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$block</td><td>Name of the block - in form of loop:XXX or block:XXX. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_template_compiler_ex.html#a91899408f7ddf3173a8932bb8277aad7" title="Generates code from given node&#39;s children.">TemplateCompilerEx::handleChildren</a> </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00345">345</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00317">generateCode()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00816">TemplateStdLibExPlugin::handleTBlock()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00931">TemplateStdLibExPlugin::handleTFilter()</a>.</p>

</div>
</div>
<a class="anchor" id="a773e98ffac99fdbe9f8934768f840d3c"></a><!-- doxytag: member="TemplateCompilerEx::handleNode" ref="a773e98ffac99fdbe9f8934768f840d3c" args="(TemplateNodeEx $node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates code from given node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Code as string </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Maybe it should be merged with <a class="el" href="class_template_compiler_ex.html#a91899408f7ddf3173a8932bb8277aad7">TemplateCompilerEx::handleChildren</a>? </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00356">356</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00330">handleChildren()</a>.</p>

</div>
</div>
<a class="anchor" id="af0951cb966c81753464771dfaeffa625"></a><!-- doxytag: member="TemplateCompilerEx::handleTag" ref="af0951cb966c81753464771dfaeffa625" args="(TemplateNodeEx $node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleTag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handles <code>'blockTag'</code> and 'inlineTag' nodes. </p>
<p>Calls proper tag handler (see <a class="el" href="extending-st.html#extending-st-handlers">Extending: handlers</a>).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Tag node to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Code as string </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00372">372</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="ad4a05c2ff0b4e3ae9ee530780dc129b1"></a><!-- doxytag: member="TemplateCompilerEx::handleVariable" ref="ad4a05c2ff0b4e3ae9ee530780dc129b1" args="(TemplateNodeEx $node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleVariable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handles <code>'var'</code> node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Variable node to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Code as string </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00401">401</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a8efc4fef1f377e69631fe3de4c2033e3"></a><!-- doxytag: member="TemplateCompilerEx::parseVariableExpression" ref="a8efc4fef1f377e69631fe3de4c2033e3" args="(TemplateNodeEx $node, $variable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::parseVariableExpression </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>variable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parses variable expression, and creates runtime PHP access code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Source node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$variable</td><td>Variable expression to parse </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array(access code, existence checking code) </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00423">423</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00019">TemplateUtils::escape()</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01321">TemplateStdLibExPlugin::commonIfEqual()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00843">TemplateStdLibExPlugin::handleTCycle()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00943">TemplateStdLibExPlugin::handleTFirstOf()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01352">TemplateStdLibExPlugin::handleTInclude()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01369">TemplateStdLibExPlugin::handleTNow()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01192">TemplateStdLibExPlugin::parseIfExpression()</a>.</p>

</div>
</div>
<a class="anchor" id="a9e9d99501cd4def7eb25dc93cbef94b5"></a><!-- doxytag: member="TemplateCompilerEx::generateVariableAST" ref="a9e9d99501cd4def7eb25dc93cbef94b5" args="($variable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::generateVariableAST </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>variable</em>&#160;)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generates syntax tree (using nested arrays ATM) from given variable expression. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$variable</td><td>Variable expression to parse </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Arrayized AST </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00442">442</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="af68b6944da2fc99dfda0c7a89f11656d"></a><!-- doxytag: member="TemplateCompilerEx::generateVariableCode" ref="af68b6944da2fc99dfda0c7a89f11656d" args="(TemplateNodeEx $node, &amp;$ast)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::generateVariableCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;$&#160;</td>
          <td class="paramname"> <em>ast</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Recursively parses variable AST, and generates PHP access code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Source node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$ast</td><td>AST to process </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Access code </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00464">464</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a0e954efa4b344518798797fe3bc6dd14"></a><!-- doxytag: member="TemplateCompilerEx::parseFilterChain" ref="a0e954efa4b344518798797fe3bc6dd14" args="(TemplateNodeEx $node, $filterExpr, $code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::parseFilterChain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>filterExpr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>code</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handles filter chains. </p>
<p>Wraps given code, and returns new one.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Filter chain source node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$filterExpr</td><td>Filter chain expression (e.g. a|b|c:d) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$code</td><td>Code to wrap in filters </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>New code that uses filters </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00528">528</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00019">TemplateUtils::escape()</a>, <a class="el" href="_utils_8php_source.html#l00057">TemplateUtils::split()</a>, and <a class="el" href="_utils_8php_source.html#l00079">TemplateUtils::splitEscaped()</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01321">TemplateStdLibExPlugin::commonIfEqual()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00931">TemplateStdLibExPlugin::handleTFilter()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01369">TemplateStdLibExPlugin::handleTNow()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01192">TemplateStdLibExPlugin::parseIfExpression()</a>.</p>

</div>
</div>
<a class="anchor" id="aa45b715a26c3bd45064f4eee890c1dad"></a><!-- doxytag: member="TemplateCompilerEx::commonVerifyElement" ref="aa45b715a26c3bd45064f4eee890c1dad" args="(TemplateNodeEx $node, $element, &amp;$name, array &amp;$args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::commonVerifyElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>element</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;$&#160;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Verifies correctness of given element. </p>
<p>Checks whether: </p>
<ul>
<li>
Element exists </li>
<li>
Element's handler is callable </li>
<li>
Enough arguments have been provided </li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Template node representing element </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$element</td><td>Element type - <code>'tag'</code> or <code>'filter'</code> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$name</td><td>Element's name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$args</td><td>Element's arguments </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Element's info array </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00580">580</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00191">TemplateUtils::checkIfAllowed()</a>, <a class="el" href="_error_8php_source.html#l00053">TemplateError::E_INVALID_HANDLER</a>, <a class="el" href="_error_8php_source.html#l00058">TemplateError::E_INVALID_SYNTAX</a>, <a class="el" href="_error_8php_source.html#l00047">TemplateError::E_UNKNOWN_FILTER</a>, <a class="el" href="_error_8php_source.html#l00042">TemplateError::E_UNKNOWN_TAG</a>, <a class="el" href="_utils_8php_source.html#l00176">TemplateUtils::panic()</a>, and <a class="el" href="_utils_8php_source.html#l00045">TemplateUtils::strip()</a>.</p>

</div>
</div>
<a class="anchor" id="a49ac9c78629669903684589ebcd76033"></a><!-- doxytag: member="TemplateCompilerEx::handleLoadBuiltin" ref="a49ac9c78629669903684589ebcd76033" args="(TemplateCompilerEx $compiler, TemplateNodeEx $node, &amp;$tag, array &amp;$args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleLoadBuiltin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> $&#160;</td>
          <td class="paramname"> <em>compiler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;$&#160;</td>
          <td class="paramname"> <em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handler for <code>load</code> built-in tag. </p>
<p>For handlers reference, see <a class="el" href="extending-st.html#extending-st-handlers">Extending: handlers</a>. For standard and built-in tags reference, see <a class="el" href="stdlib.html#stdlib-tags">Standard tags</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$compiler</td><td>Compiler handle (<a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> instance) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node handle (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> instance, see <a class="el" href="extending-st.html#extending-st-ast">Extending: AST nodes</a>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$tag</td><td>Tag name (as string) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$args</td><td>Tag arguments (as array) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00628">628</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00063">TemplateError::E_UNKNOWN_PLUGIN</a>.</p>

</div>
</div>
<a class="anchor" id="ac5ba453fe0497c6a97e01b3ecc7b9c30"></a><!-- doxytag: member="TemplateCompilerEx::handleCommentBuiltin" ref="ac5ba453fe0497c6a97e01b3ecc7b9c30" args="(TemplateCompilerEx $compiler, TemplateNodeEx $node, &amp;$tag, array &amp;$args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::handleCommentBuiltin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> $&#160;</td>
          <td class="paramname"> <em>compiler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;$&#160;</td>
          <td class="paramname"> <em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handler for <code>comment</code> built-in tag. </p>
<p>For handlers reference, see <a class="el" href="extending-st.html#extending-st-handlers">Extending: handlers</a>. For standard and built-in tags reference, see <a class="el" href="stdlib.html#stdlib-tags">Standard tags</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$compiler</td><td>Compiler handle (<a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> instance) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node handle (<a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> instance, see <a class="el" href="extending-st.html#extending-st-ast">Extending: AST nodes</a>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$tag</td><td>Tag name (as string) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$args</td><td>Tag arguments (as array) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00649">649</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a8f7f10bdd17ee4be906b39cff3f0d13d"></a><!-- doxytag: member="TemplateCompilerEx::raise" ref="a8f7f10bdd17ee4be906b39cff3f0d13d" args="(TemplateNodeEx $node, $message, $code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::raise </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>code</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Raises an error, appending "(in template &lt;file&gt; somewhere around line &lt;line&gt;)" using given node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node producing an error </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$message</td><td>Error message </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$code</td><td>Error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_template_error.html" title="Main and currently the only exception type thrown by SithTemplate internals.">TemplateError</a> </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00665">665</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>.</p>

</div>
</div>
<a class="anchor" id="af8bc3411f0f8bcfbd153a8d56f0ae2e7"></a><!-- doxytag: member="TemplateCompilerEx::raiseIf" ref="af8bc3411f0f8bcfbd153a8d56f0ae2e7" args="($cond, TemplateNodeEx $node, $message, $code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::raiseIf </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>cond</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>code</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shorthand for conditional call to <a class="el" href="class_template_compiler_ex.html#a8f7f10bdd17ee4be906b39cff3f0d13d">TemplateCompilerEx::raise</a>. </p>
<p>Won't raise if <code>$cond</code> is <code>false</code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$cond</td><td>Condition value as boolean </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Node producing an error </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$message</td><td>Error message </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$code</td><td>Error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_template_error.html" title="Main and currently the only exception type thrown by SithTemplate internals.">TemplateError</a> </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00682">682</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01321">TemplateStdLibExPlugin::commonIfEqual()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00799">TemplateStdLibExPlugin::handleTAutoEscape()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00816">TemplateStdLibExPlugin::handleTBlock()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00843">TemplateStdLibExPlugin::handleTCycle()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00911">TemplateStdLibExPlugin::handleTExtends()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00943">TemplateStdLibExPlugin::handleTFirstOf()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01394">TemplateStdLibExPlugin::handleTTemplateTag()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01192">TemplateStdLibExPlugin::parseIfExpression()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01178">TemplateStdLibExPlugin::parseIfExpressionCheckParens()</a>.</p>

</div>
</div>
<a class="anchor" id="a9ce1b5f9a87d8fdbadfad18bb440efff"></a><!-- doxytag: member="TemplateCompilerEx::findAlternativeBranch" ref="a9ce1b5f9a87d8fdbadfad18bb440efff" args="(TemplateNodeEx $node, $tag)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::findAlternativeBranch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> $&#160;</td>
          <td class="paramname"> <em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>tag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to find and isolate alternative branch of given node, starting with given inline tag. </p>
<p>Can be used wherever alternative (e.g. <code>{% else %}</code>) branch cannot be implemented by simply inlining some code (e.g. <code>} else {</code>).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Current node </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$tag</td><td>Tag starting alternative branch </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array(main nodes, alternative branch nodes) </dd></dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00695">695</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>.</p>

</div>
</div>
<a class="anchor" id="a0cee437cbd376a2ad926de8b745e120c"></a><!-- doxytag: member="TemplateCompilerEx::generateUniqueBlock" ref="a0cee437cbd376a2ad926de8b745e120c" args="($idPrefix, $blockPrefix= 'custom:', $keyLength=5)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::generateUniqueBlock </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>idPrefix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>blockPrefix</em> = <code>'custom:'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>keyLength</em> = <code>5</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generates prefixed block name that is guaranteed to be unique in current template. </p>
<p>By default generates 5-character unique key using combination of <code>uniqid</code>, <code>mt_rand</code> and <code>md5</code>. Beware: potential infinite loop - if key length is too small, then key space might be exhausted, which will lead to infinite loop in this function. Increase <code>$keyLength</code> if your usage could lead to this condition.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$idPrefix</td><td><code>uniqid</code> prefix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$blockPrefix</td><td>Unique key will be prefixed with this. Default: <code>custom:</code>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$keyLength</td><td>Length of generated key. Must be lower than 32. Default: 5. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00729">729</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00176">TemplateUtils::panic()</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>.</p>

</div>
</div>
<a class="anchor" id="adb76060dfb9e369b12ee21bea4a51b8d"></a><!-- doxytag: member="TemplateCompilerEx::runHooks" ref="adb76060dfb9e369b12ee21bea4a51b8d" args="($hookPoint, array $args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::runHooks </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>hookPoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array $&#160;</td>
          <td class="paramname"> <em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Runs handlers associated with given hook-point. </p>
<p>Every handler might return <code>true</code> boolean value, to break the chain and finish hook execution.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$hookPoint</td><td>Hook-point to execute </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$args</td><td>Array of hook arguments </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">true</td><td>Some handler has broken the chain </td></tr>
    <tr><td class="paramname">false</td><td>All handlers have been executed, and none has broken the chain </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00756">756</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00053">TemplateError::E_INVALID_HANDLER</a>, and <a class="el" href="_utils_8php_source.html#l00045">TemplateUtils::strip()</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a7436ce4d99eb25b14012d0fea3329545"></a><!-- doxytag: member="TemplateCompilerEx::$settings" ref="a7436ce4d99eb25b14012d0fea3329545" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$settings = null</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Current settings (reference to <a class="el" href="class_template_environ.html#a1a6916c9094781e70523b3ed7ba20b68">TemplateEnviron::$settings</a>). </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00033">33</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="ac6a93435059bcde30df1f24bfbfa53e3"></a><!-- doxytag: member="TemplateCompilerEx::$plugins" ref="ac6a93435059bcde30df1f24bfbfa53e3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$plugins = null</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registry of available plugins. </p>
<p><a class="el" href="class_template_plugins.html">TemplatePlugins</a> instance. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00039">39</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="ae1e96f5d9cdab5a8cef660e9bd0347c1"></a><!-- doxytag: member="TemplateCompilerEx::$loadedPlugins" ref="ae1e96f5d9cdab5a8cef660e9bd0347c1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$loadedPlugins = array()</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registry of loaded plugins (per-template). </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00043">43</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a96c1fa9a15fb7c1a36a3a212073f97f4"></a><!-- doxytag: member="TemplateCompilerEx::$parserCurrentToken" ref="a96c1fa9a15fb7c1a36a3a212073f97f4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$parserCurrentToken = null<code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Currently processed token. </p>
<p>Assoc. array containing two keys - <code>'type'</code> and <code>'content'</code>. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00050">50</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a04c4c26c3f5b84a7f2743fd6253fbce9"></a><!-- doxytag: member="TemplateCompilerEx::$parserCurrentLine" ref="a04c4c26c3f5b84a7f2743fd6253fbce9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$parserCurrentLine = 1<code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Currently processed line (approx). </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00054">54</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="af3d5cc74f7c0cc06676b50a5efe95112"></a><!-- doxytag: member="TemplateCompilerEx::$parserCurrentFile" ref="af3d5cc74f7c0cc06676b50a5efe95112" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$parserCurrentFile = null<code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Currently processed template. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00058">58</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="ab61b2762e9cea921fd26a4153067f983"></a><!-- doxytag: member="TemplateCompilerEx::$parserTokenRegexp" ref="ab61b2762e9cea921fd26a4153067f983" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$parserTokenRegexp = '~(\{\%.*?\%\})|(\{\{.*?\}\})|(\{\#.*?\#\})~u'<code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Regular expression used to split template into tokens. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00062">62</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a6c58447a001891500c54f1e9afc30b20"></a><!-- doxytag: member="TemplateCompilerEx::$blocks" ref="a6c58447a001891500c54f1e9afc30b20" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$blocks = array()</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Already constructed code blocks. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00068">68</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="aa33edba89e0e64230b47973bbf33ef4e"></a><!-- doxytag: member="TemplateCompilerEx::$metadata" ref="aa33edba89e0e64230b47973bbf33ef4e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$metadata = array()</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Template's metadata. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00072">72</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<a class="anchor" id="a47169b58844fe3ddabd63f7d6af5067d"></a><!-- doxytag: member="TemplateCompilerEx::$className" ref="a47169b58844fe3ddabd63f7d6af5067d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateCompilerEx::$className = null</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Template's classname. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00076">76</a> of file <a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_compiler_ex_8php_source.html">CompilerEx.php</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jan 14 2011 20:08:37 for SithTemplate by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
Return current item: SithTemplate