Location: PHPKode > projects > TeamSpeak 3 PHP Framework > docs/html/class_team_speak3___viewer___text.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>TeamSpeak 3 PHP Framework: TeamSpeak3_Viewer_Text Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="TeamSpeak.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">TeamSpeak 3 PHP Framework
   &#160;<span id="projectnumber">1.1.20</span>
   </div>
   <div id="projectbrief">Copyright © Planet TeamSpeak. All rights reserved.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" 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>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" 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><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_team_speak3___viewer___text.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_team_speak3___viewer___text-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">TeamSpeak3_Viewer_Text Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Renders nodes used in ASCII-based TeamSpeak 3 viewers.  
 <a href="class_team_speak3___viewer___text.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for TeamSpeak3_Viewer_Text:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="class_team_speak3___viewer___text.png" usemap="#TeamSpeak3_Viewer_Text_map" alt=""/>
  <map id="TeamSpeak3_Viewer_Text_map" name="TeamSpeak3_Viewer_Text_map">
<area href="interface_team_speak3___viewer___interface.html" title="Interface class describing a TeamSpeak 3 viewer." alt="TeamSpeak3_Viewer_Interface" shape="rect" coords="0,0,188,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8fb29a4ed7e5a605bd59bed82fd912bc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___viewer___text.html#a8fb29a4ed7e5a605bd59bed82fd912bc">fetchObject</a> (<a class="el" href="class_team_speak3___node___abstract.html">TeamSpeak3_Node_Abstract</a> $node, array $siblings=array())</td></tr>
<tr class="memdesc:a8fb29a4ed7e5a605bd59bed82fd912bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the code needed to display a node in a TeamSpeak 3 viewer.  <a href="#a8fb29a4ed7e5a605bd59bed82fd912bc">More...</a><br/></td></tr>
<tr class="separator:a8fb29a4ed7e5a605bd59bed82fd912bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:acd7d9ebbae3700e38b0bcb6767728936"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___viewer___text.html#acd7d9ebbae3700e38b0bcb6767728936">getPrefix</a> ()</td></tr>
<tr class="memdesc:acd7d9ebbae3700e38b0bcb6767728936"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the ASCII string to display the prefix of the current node.  <a href="#acd7d9ebbae3700e38b0bcb6767728936">More...</a><br/></td></tr>
<tr class="separator:acd7d9ebbae3700e38b0bcb6767728936"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bf9b2137c14dad13c8fd2e2df33615c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___viewer___text.html#a7bf9b2137c14dad13c8fd2e2df33615c">getCorpusIcon</a> ()</td></tr>
<tr class="memdesc:a7bf9b2137c14dad13c8fd2e2df33615c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an ASCII string which can be used to display the status icon for a TeamSpeak_Node_Abstract object.  <a href="#a7bf9b2137c14dad13c8fd2e2df33615c">More...</a><br/></td></tr>
<tr class="separator:a7bf9b2137c14dad13c8fd2e2df33615c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d6fcf3812bf72c81214263da3e6f555"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_team_speak3___viewer___text.html#a8d6fcf3812bf72c81214263da3e6f555">getCorpusName</a> ()</td></tr>
<tr class="memdesc:a8d6fcf3812bf72c81214263da3e6f555"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string for the current corpus element which contains the display name for the current TeamSpeak_Node_Abstract object.  <a href="#a8d6fcf3812bf72c81214263da3e6f555">More...</a><br/></td></tr>
<tr class="separator:a8d6fcf3812bf72c81214263da3e6f555"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa39cd6d4d771d9c4d94e368e1b548405"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa39cd6d4d771d9c4d94e368e1b548405"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$pattern</b> = &quot;%0%1 %2\n&quot;</td></tr>
<tr class="separator:aa39cd6d4d771d9c4d94e368e1b548405"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Renders nodes used in ASCII-based TeamSpeak 3 viewers. </p>

<p>Definition at line <a class="el" href="_text_8php_source.html#l00032">32</a> of file <a class="el" href="_text_8php_source.html">Text.php</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8fb29a4ed7e5a605bd59bed82fd912bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Viewer_Text::fetchObject </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_team_speak3___node___abstract.html">TeamSpeak3_Node_Abstract</a>&#160;</td>
          <td class="paramname"><em>$node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array&#160;</td>
          <td class="paramname"><em>$siblings</em> = <code>array()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the code needed to display a node in a TeamSpeak 3 viewer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"><a class="el" href="class_team_speak3___node___abstract.html" title="Abstract class describing a TeamSpeak 3 node and all it&#39;s parameters.">TeamSpeak3_Node_Abstract</a></td><td class="paramname">$node</td><td></td></tr>
    <tr><td class="paramtype">array</td><td class="paramname">$siblings</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="_text_8php_source.html#l00048">48</a> of file <a class="el" href="_text_8php_source.html">Text.php</a>.</p>

<p>References <a class="el" href="_string_8php_source.html#l00063">TeamSpeak3_Helper_String\factory()</a>, <a class="el" href="_text_8php_source.html#l00092">getCorpusIcon()</a>, <a class="el" href="_text_8php_source.html#l00103">getCorpusName()</a>, and <a class="el" href="_text_8php_source.html#l00067">getPrefix()</a>.</p>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    $this-&gt;currObj = $node;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    $this-&gt;currSib = $siblings;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    $args = array(</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      $this-&gt;<a class="code" href="class_team_speak3___viewer___text.html#acd7d9ebbae3700e38b0bcb6767728936" title="Returns the ASCII string to display the prefix of the current node.">getPrefix</a>(),</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      $this-&gt;<a class="code" href="class_team_speak3___viewer___text.html#a7bf9b2137c14dad13c8fd2e2df33615c" title="Returns an ASCII string which can be used to display the status icon for a TeamSpeak_Node_Abstract ob...">getCorpusIcon</a>(),</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      $this-&gt;<a class="code" href="class_team_speak3___viewer___text.html#a8d6fcf3812bf72c81214263da3e6f555" title="Returns a string for the current corpus element which contains the display name for the current TeamS...">getCorpusName</a>(),</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    );</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_team_speak3___helper___string.html#a475f5a602d67dd0568fb8c86352c88a0" title="Returns a TeamSpeak3_Helper_String object for thegiven string.">TeamSpeak3_Helper_String::factory</a>($this-&gt;pattern)-&gt;arg($args);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acd7d9ebbae3700e38b0bcb6767728936"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Viewer_Text::getPrefix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the ASCII string to display the prefix of the current node. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="_text_8php_source.html#l00067">67</a> of file <a class="el" href="_text_8php_source.html">Text.php</a>.</p>

<p>Referenced by <a class="el" href="_text_8php_source.html#l00048">fetchObject()</a>.</p>
<div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    $prefix = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">if</span>(count($this-&gt;currSib))</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      $last = array_pop($this-&gt;currSib);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      <span class="keywordflow">foreach</span>($this-&gt;currSib as $sibling)</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        $prefix .=  ($sibling) ? <span class="stringliteral">&quot;| &quot;</span> : <span class="stringliteral">&quot;  &quot;</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;      $prefix .= ($last) ? <span class="stringliteral">&quot;\\-&quot;</span> : <span class="stringliteral">&quot;|-&quot;</span>;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">return</span> $prefix;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7bf9b2137c14dad13c8fd2e2df33615c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Viewer_Text::getCorpusIcon </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns an ASCII string which can be used to display the status icon for a TeamSpeak_Node_Abstract object. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="_text_8php_source.html#l00092">92</a> of file <a class="el" href="_text_8php_source.html">Text.php</a>.</p>

<p>Referenced by <a class="el" href="_text_8php_source.html#l00048">fetchObject()</a>.</p>
<div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">return</span> $this-&gt;currObj-&gt;getSymbol();</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8d6fcf3812bf72c81214263da3e6f555"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TeamSpeak3_Viewer_Text::getCorpusName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a string for the current corpus element which contains the display name for the current TeamSpeak_Node_Abstract object. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Definition at line <a class="el" href="_text_8php_source.html#l00103">103</a> of file <a class="el" href="_text_8php_source.html">Text.php</a>.</p>

<p>Referenced by <a class="el" href="_text_8php_source.html#l00048">fetchObject()</a>.</p>
<div class="fragment"><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">return</span> $this-&gt;currObj;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>TeamSpeak3/Viewer/<a class="el" href="_text_8php_source.html">Text.php</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_team_speak3___viewer___text.html">TeamSpeak3_Viewer_Text</a></li>
    <li class="footer">Generated on Fri Mar 8 2013 18:10:43 for TeamSpeak 3 PHP Framework by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
Return current item: TeamSpeak 3 PHP Framework