Location: PHPKode > projects > Energine > energine-2.2/doc/api/energine/core/TreeNode.html
<?xml version="1.0" encoding="utf-8"?>
<!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/html; charset=utf-8'/>
			<title>Docs For Class TreeNode</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> TreeNode</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
                <p class="implements">
            Implements interfaces:
            <ul>
                <li>IteratorAggregate (internal interface)</li>            </ul>
        </p>
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Класс реализующий работу с узлом дерева</p>
	<ul class="tags">
				<li><span class="field">final:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_framework---TreeNode.class.php.html">/framework/TreeNode.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a21">21</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
					<a href="#$children" title="details" class="var-name">$children</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">int</span>
					<a href="#$id" title="details" class="var-name">$id</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
					<a href="#$parent" title="details" class="var-name">$parent</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																															
				<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
										<a href="#addChild" title="details" class="method-name">addChild</a>
											(<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>&nbsp;<span class="var-name">$node</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#asList" title="details" class="method-name">asList</a>
											([<span class="var-type">bool</span>&nbsp;<span class="var-name">$isRecursive</span> = <span class="var-default">true</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
										<a href="#getChildren" title="details" class="method-name">getChildren</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
										<a href="#getDescendants" title="details" class="method-name">getDescendants</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#getID" title="details" class="method-name">getID</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
										<a href="#getIterator" title="details" class="method-name">getIterator</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
										<a href="#getParent" title="details" class="method-name">getParent</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
										<a href="#getParents" title="details" class="method-name">getParents</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#hasChildren" title="details" class="method-name">hasChildren</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/PrivateMethod.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
										<a href="#iterateDescendants" title="details" class="method-name">iterateDescendants</a>
											(<span class="var-type"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>&nbsp;<span class="var-name">$nodeList</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
										<a href="#removeChild" title="details" class="method-name">removeChild</a>
											(<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>&nbsp;<span class="var-name">$node</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$children" id="$children"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
			<span class="var-name">$children</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a42">42</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Массив дочерних узлов</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$id" id="$id"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$id</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a28">28</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Идентификатор узла</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$parent" id="$parent"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
			<span class="var-name">$parent</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a35">35</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Идентификатор родительского узла</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a49">49</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Конструктор класса</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodaddChild" id="addChild"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">addChild</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a116">116</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Добавление узла как дочернего</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
		<span class="method-name">
			addChild
		</span>
					(<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>&nbsp;<span class="var-name">$node</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
				<span class="var-name">$node</span>			</li>
				</ul>
		
			
	</div>
<a name="methodasList" id="asList"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">asList</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a190">190</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает объект в виде массива</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			asList
		</span>
					([<span class="var-type">bool</span>&nbsp;<span class="var-name">$isRecursive</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$isRecursive</span><span class="var-description">: рекурсия</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetChildren" id="getChildren"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getChildren</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a94">94</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает массив потомков</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
		<span class="method-name">
			getChildren
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetDescendants" id="getDescendants"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getDescendants</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a161">161</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает всех потомков</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
		<span class="method-name">
			getDescendants
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetID" id="getID"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getID</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a61">61</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает идентификатор узла</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getID
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetIterator" id="getIterator"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getIterator</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a104">104</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает итератор объекта</p>
	<ul class="tags">
				<li><span class="field">see:</span> IteratorAggregate</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
		<span class="method-name">
			getIterator
		</span>
				()
			</div>
	
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt>IteratorAggregate::getIterator</dt>
					</dl>
			
	</div>
<a name="methodgetParent" id="getParent"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getParent</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a72">72</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает родительский узел</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
		<span class="method-name">
			getParent
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetParents" id="getParents"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getParents</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a143">143</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает всех родителей узла</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
		<span class="method-name">
			getParents
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhasChildren" id="hasChildren"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">hasChildren</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a83">83</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает флаг указывающий на наличие детей</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			hasChildren
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoditerateDescendants" id="iterateDescendants"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/PrivateMethod.png" />
		<span class="method-title">iterateDescendants</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a173">173</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Внутренний метод возвращаения потомков</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
		<span class="method-name">
			iterateDescendants
		</span>
					(<span class="var-type"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>&nbsp;<span class="var-name">$nodeList</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../energine/core/TreeNodeList.html">TreeNodeList</a></span>
				<span class="var-name">$nodeList</span>			</li>
				</ul>
		
			
	</div>
<a name="methodremoveChild" id="removeChild"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">removeChild</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine_core_frameworkTreeNode.class.php.html#a131">131</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Удаление узла из списка дочерних узлов</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
		<span class="method-name">
			removeChild
		</span>
					(<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>&nbsp;<span class="var-name">$node</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../energine/core/TreeNode.html">TreeNode</a></span>
				<span class="var-name">$node</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Mon, 17 Sep 2007 13:33:00 +0300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0a2</a>
	</p>
	</div></body>
</html>
Return current item: Energine