Location: PHPKode > projects > Noti > doc/core/noti/Category.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 xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Category</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 Category</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">The Category class provides basic data access and primitive functions for  categories</p>
	<ul class="tags">
				<li><span class="field">since:</span> Noti 0.5.0</li>
				<li><span class="field">version:</span> $Revision: 1.3 $</li>
				<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/gpl.txt">GPL</a></li>
				<li><span class="field">author:</span> Pablo Hoffman &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Category_class.html">/Category.class</a> (line <span class="field">25</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">
					<span class="var-type">mixed</span>
					<a href="#$_id" title="details" class="var-name">$_id</a>
				</div>
								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_name" title="details" class="var-name">$_name</a>
				</div>
								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_site" title="details" class="var-name">$_site</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">
											<span class="method-result">Category</span>
										<a href="#Category" title="details" class="method-name">Category</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$cid</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#from" title="details" class="method-name">from</a>
											(<span class="var-type"><a href="../noti/Site.html">Site</a></span>&nbsp;<span class="var-name">$site</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../noti/Category.html">object Category</a></span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$site</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getAreas" title="details" class="method-name">getAreas</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getId" title="details" class="method-name">getId</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../noti/Site.html">Site</a></span>
										<a href="#getSite" title="details" class="method-name">getSite</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#notes" title="details" class="method-name">notes</a>
											([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$filter</span> = <span class="var-default">""</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../noti/Category.html">object Category</a></span>
										<a href="#spawn" title="details" class="method-name">spawn</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$site</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$_id" id="$_id"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_id</span>
						(line <span class="line-number">28</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_name</span>
						(line <span class="line-number">29</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_site</span>
						(line <span class="line-number">30</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</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="methodCategory" id="Category"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Category</span> (line <span class="line-number">40</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor: creates a Category object given its ID.</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Category</span>
		<span class="method-name">
			Category
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$cid</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$cid</span><span class="var-description">: The category ID</span>			</li>
				</ul>
		
		
	</div>
<a name="methodfrom" id="from"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">from</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return all categories from the given site</p>
	<ul class="tags">
				<li><span class="field">return:</span> Array of Subscription</li>
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			from
		</span>
					(<span class="var-type"><a href="../noti/Site.html">Site</a></span>&nbsp;<span class="var-name">$site</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../noti/Site.html">Site</a></span>
				<span class="var-name">$site</span><span class="var-description">: The site</span>			</li>
				</ul>
		
		
	</div>
<a name="methodget" id="get"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get</span> (line <span class="line-number">80</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return a category given its site name and category name</p>
	<ul class="tags">
				<li><span class="field">return:</span> The category found, or false if not found</li>
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../noti/Category.html">object Category</a></span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$site</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$cname</span><span class="var-description">: The category name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$site</span><span class="var-description">: The site which the category belongs to</span>			</li>
				</ul>
		
		
	</div>
<a name="methodgetAreas" id="getAreas"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getAreas</span> (line <span class="line-number">160</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get areas which this category belongs to</p>
	<ul class="tags">
				<li><span class="field">return:</span> Array of Area</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getAreas
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetId" id="getId"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getId</span> (line <span class="line-number">125</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the Category ID</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="methodgetName" id="getName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getName</span> (line <span class="line-number">136</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the Category name</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">
			getName
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetSite" id="getSite"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getSite</span> (line <span class="line-number">148</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get site which this category belongs to</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../noti/Site.html">Site</a></span>
		<span class="method-name">
			getSite
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodnotes" id="notes"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">notes</span> (line <span class="line-number">192</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all today notes from this category</p>
	<ul class="tags">
				<li><span class="field">return:</span> Array of Note</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			notes
		</span>
					([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$filter</span> = <span class="var-default">""</span>])
			</div>
	
		
		
	</div>
<a name="methodspawn" id="spawn"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">spawn</span> (line <span class="line-number">106</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a category given its site and category name. If the  category already exists it will be returned.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The new category found, or the existing one                              if any</li>
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../noti/Category.html">object Category</a></span>
		<span class="method-name">
			spawn
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$site</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$cname</span><span class="var-description">: The category name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$site</span><span class="var-description">: The site which the category (will) belong to</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sat, 18 Mar 2006 04:40:12 -0300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>
Return current item: Noti