Location: PHPKode > projects > SithTemplate > SithTemplate-1.1/docs/html/class_template_node_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: TemplateNodeEx 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>  </div>
  <div class="headertitle">
<h1>TemplateNodeEx Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="TemplateNodeEx" -->
<p>Class-container for AST nodes.  
<a href="#_details">More...</a></p>

<p><a href="class_template_node_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_node_ex.html#aa44f330a0ecb8832f1990f5e3b6de712">__construct</a> ($id, $parent=null, $content=null, $file=null, $line=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aa44f330a0ecb8832f1990f5e3b6de712"></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_node_ex.html#ac4a2737627e12bace528ee449b45943f">addChild</a> ($id, $content=null, $file=null, $line=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <code><a class="el" href="class_template_node_ex.html" title="Class-container for AST nodes.">TemplateNodeEx</a></code> instance and adds it to this node children.  <a href="#ac4a2737627e12bace528ee449b45943f"></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_node_ex.html#a91391755954ef38c641ba68c1f752871">dump</a> ($level=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Debugging aid.  <a href="#a91391755954ef38c641ba68c1f752871"></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_node_ex.html#a197e9a2189b3f2e5da6960792c2b0bc2">$nodeID</a> = ''</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of this node.  <a href="#a197e9a2189b3f2e5da6960792c2b0bc2"></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_node_ex.html#a52572f655c352c200900c661fced7c7f">$nodeParent</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parent of this node.  <a href="#a52572f655c352c200900c661fced7c7f"></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_node_ex.html#a11071f5a75e8b01504b94c70b20a16f9">$nodeChildren</a> = array()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Children of this node.  <a href="#a11071f5a75e8b01504b94c70b20a16f9"></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_node_ex.html#a02b43357ebf9a8c78a4b7ed6d50f666a">$nodeContent</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Content of this node.  <a href="#a02b43357ebf9a8c78a4b7ed6d50f666a"></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_node_ex.html#a90a4bddb119982b9e11fd7293768e387">$nodeLine</a> = 0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Aid for template debugging, source line where the parser constructed this node.  <a href="#a90a4bddb119982b9e11fd7293768e387"></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_node_ex.html#aa00e50823c505da795c0b2381badc312">$nodeFile</a> = null</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Aid for template debugging, source file where the parser constructed this node.  <a href="#aa00e50823c505da795c0b2381badc312"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Class-container for AST nodes. </p>
<p>Contains node ID (it's type), references to its parent and children, preprocessed content, and source template line where it has been found (although it may not be very accurate). </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00784">784</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="aa44f330a0ecb8832f1990f5e3b6de712"></a><!-- doxytag: member="TemplateNodeEx::__construct" ref="aa44f330a0ecb8832f1990f5e3b6de712" args="($id, $parent=null, $content=null, $file=null, $line=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateNodeEx::__construct </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>parent</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>content</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>file</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>line</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>Type of this node </td></tr>
    <tr><td class="paramname">$parent</td><td>Parent of this node </td></tr>
    <tr><td class="paramname">$content</td><td>Content of this node </td></tr>
    <tr><td class="paramname">$file</td><td>Source template file </td></tr>
    <tr><td class="paramname">$line</td><td>Source template line </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00822">822</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="ac4a2737627e12bace528ee449b45943f"></a><!-- doxytag: member="TemplateNodeEx::addChild" ref="ac4a2737627e12bace528ee449b45943f" args="($id, $content=null, $file=null, $line=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateNodeEx::addChild </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>content</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>file</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>line</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="class_template_node_ex.html" title="Class-container for AST nodes.">TemplateNodeEx</a></code> instance and adds it to this node children. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>Type of new node </td></tr>
    <tr><td class="paramname">$content</td><td>Content of new node </td></tr>
    <tr><td class="paramname">$file</td><td>Source template file </td></tr>
    <tr><td class="paramname">$line</td><td>Source template line </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00838">838</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#l00261">TemplateCompilerEx::createNodeFromToken()</a>.</p>

</div>
</div>
<a class="anchor" id="a91391755954ef38c641ba68c1f752871"></a><!-- doxytag: member="TemplateNodeEx::dump" ref="a91391755954ef38c641ba68c1f752871" args="($level=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateNodeEx::dump </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>level</em> = <code>0</code>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Debugging aid. </p>
<p>Dumps the AST and its children.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$level</td><td>Current indentation level </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The plaintext dump of current level and levels below </dd></dl>

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

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a197e9a2189b3f2e5da6960792c2b0bc2"></a><!-- doxytag: member="TemplateNodeEx::$nodeID" ref="a197e9a2189b3f2e5da6960792c2b0bc2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateNodeEx::$nodeID = ''</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Type of this node. </p>
<p>It may be <code>'text'</code> (for plaintext nodes), <code>'var'</code> (for variable nodes), <code>'inlineTag'</code> or <code>'blockTag'</code> (for inline and block tag nodes). </p>

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

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

<p>Parent of this node. </p>

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

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

<p>Children of this node. </p>

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

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

<p>Content of this node. </p>
<p>It may be plain text (for text and var nodes), or an array (for tag nodes - <code></code>[0] will be the tag's name and <code></code>[1] the array of its arguments). </p>

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

</div>
</div>
<a class="anchor" id="a90a4bddb119982b9e11fd7293768e387"></a><!-- doxytag: member="TemplateNodeEx::$nodeLine" ref="a90a4bddb119982b9e11fd7293768e387" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TemplateNodeEx::$nodeLine = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Aid for template debugging, source line where the parser constructed this node. </p>

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

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

<p>Aid for template debugging, source file where the parser constructed this node. </p>

<p>Definition at line <a class="el" href="_compiler_ex_8php_source.html#l00811">811</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