Location: PHPKode > projects > Moc10 PHP Library > docs/api-docs/Moc10_Feed/Moc10_Feed_Reader.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Moc10_Feed_Reader</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Moc10_Feed_Reader</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">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Moc10_Feed_Reader</p>
	<ul class="tags">
				<li><span class="field">author:</span> Nick Sagona, III &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.9.7</li>
				<li><span class="field">copyright:</span> Copyright (c) 2009-2011 Moc 10 Media, LLC. (http://www.moc10media.com)</li>
				<li><span class="field">license:</span> <a href="http://www.moc10phplibrary.com/LICENSE.TXT">New BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Feed---Reader.php.html">/Feed/Reader.php</a> (line <span class="field">33</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</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">
					<span class="var-type">string</span>
					<a href="#$date" title="details" class="var-name">$date</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$desc" title="details" class="var-name">$desc</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$editor" title="details" class="var-name">$editor</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$generator" title="details" class="var-name">$generator</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$items" title="details" class="var-name">$items</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$title" title="details" class="var-name">$title</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$url" title="details" class="var-name">$url</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_feed_src" title="details" class="var-name">$_feed_src</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_feed_type" title="details" class="var-name">$_feed_type</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../Moc10_Language/Moc10_Language.html">Moc10_Language</a></span>
					<a href="#$_lang" title="details" class="var-name">$_lang</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_limit" title="details" class="var-name">$_limit</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_template" title="details" class="var-name">$_template</a>
				</div>
																<div class="var-title">
					<span class="var-type">SimpleXMLElement</span>
					<a href="#$_xml" title="details" class="var-name">$_xml</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</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">
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">int|string</span>&nbsp;<span class="var-name">$limit</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getFeedType" title="details" class="method-name">getFeedType</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#render" title="details" class="method-name">render</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$dt</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$ret</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setItemTemplate" title="details" class="method-name">setItemTemplate</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmpl</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_calcElapsedTime" title="details" class="method-name">_calcElapsedTime</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$dt</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_parseFeed" title="details" class="method-name">_parseFeed</a>
										()
									</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$date" id="$date"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$date</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">58</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed date</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$desc</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">52</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed description</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$editor</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">70</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed editor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$generator</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">64</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed generator</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$items</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">76</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed items</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$title</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed title</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$url</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">46</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed URL</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_feed_src</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">100</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed source</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_feed_type</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">94</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed type</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../Moc10_Language/Moc10_Language.html">Moc10_Language</a></span>
			<span class="var-name">$_lang</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">112</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Language object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_limit</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">82</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed limit</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_template</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">106</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Feed item template</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">SimpleXMLElement</span>
			<span class="var-name">$_xml</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">88</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">XML Object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</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="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">124</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description">Instantiate the feed object.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<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">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">int|string</span>&nbsp;<span class="var-name">$limit</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span>			</li>
					<li>
				<span class="var-type">int|string</span>
				<span class="var-name">$limit</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetFeedType" id="getFeedType"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getFeedType</span> (line <span class="line-number">185</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to get feed type</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getFeedType
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrender" id="render"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">render</span> (line <span class="line-number">200</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to render the feed</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			render
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$dt</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$ret</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dt</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$ret</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetItemTemplate" id="setItemTemplate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setItemTemplate</span> (line <span class="line-number">173</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to set item template</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">
			setItemTemplate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmpl</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tmpl</span>			</li>
				</ul>
		
			
	</div>
<a name="method_calcElapsedTime" id="_calcElapsedTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_calcElapsedTime</span> (line <span class="line-number">389</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to calculate the elapsed time between the date passed and now.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_calcElapsedTime
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$dt</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dt</span>			</li>
				</ul>
		
			
	</div>
<a name="method_parseFeed" id="_parseFeed"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_parseFeed</span> (line <span class="line-number">252</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method to parse the items from the XML feed.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_parseFeed
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 12 Jan 2011 01:17:45 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>
Return current item: Moc10 PHP Library