Location: PHPKode > projects > Noti > doc/core/noti/Site.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 Site</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 Site</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 Site class provides basic data access and primitive functions for sites</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="_Site_class.html">/Site.class</a> (line <span class="field">24</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="#$_url" title="details" class="var-name">$_url</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">Site</span>
										<a href="#Site" title="details" class="method-name">Site</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$sid</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#all" title="details" class="method-name">all</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#delete" title="details" class="method-name">delete</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#exists" title="details" class="method-name">exists</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sid</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../noti/Site.html">object Site</a></span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sname</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getCategories" title="details" class="method-name">getCategories</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">string</span>
										<a href="#getUrl" title="details" class="method-name">getUrl</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#newCategory" title="details" class="method-name">newCategory</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</span>)
									</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/Site.html">object Site</a></span>
										<a href="#spawn" title="details" class="method-name">spawn</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$surl</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">27</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">28</span>)
		</span>
	</div>

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

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

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_url</span>
						(line <span class="line-number">29</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="methodSite" id="Site"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Site</span> (line <span class="line-number">38</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor: creates a Site object given its ID</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Site</span>
		<span class="method-name">
			Site
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$sid</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$sid</span><span class="var-description">: The site ID</span>			</li>
				</ul>
		
		
	</div>
<a name="methodall" id="all"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">all</span> (line <span class="line-number">93</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an array of all sites</p>
	<ul class="tags">
				<li><span class="field">return:</span> Array of Site objects</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">
			all
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methoddelete" id="delete"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">delete</span> (line <span class="line-number">109</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Delete this site and all its associated notes and categories</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">
			delete
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodexists" id="exists"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">exists</span> (line <span class="line-number">166</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if a site exists 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">boolean</span>
		<span class="method-name">
			exists
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sid</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sid</span><span class="var-description">: The site ID</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">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a site given its name</p>
	<ul class="tags">
				<li><span class="field">return:</span> The site 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/Site.html">object Site</a></span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sname</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sname</span><span class="var-description">: The site name</span>			</li>
				</ul>
		
		
	</div>
<a name="methodgetCategories" id="getCategories"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getCategories</span> (line <span class="line-number">213</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all categories from this site</p>
	<ul class="tags">
				<li><span class="field">return:</span> Category</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getCategories
		</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">178</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return site 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">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return site 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="methodgetUrl" id="getUrl"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getUrl</span> (line <span class="line-number">201</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return site URL</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">
			getUrl
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodnewCategory" id="newCategory"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">newCategory</span> (line <span class="line-number">225</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a new category under this site. If the category already exists,  it will be returned without further action.</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">
			newCategory
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$cname</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>
				</ul>
		
		
	</div>
<a name="methodnotes" id="notes"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">notes</span> (line <span class="line-number">236</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return today notes from this site</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="evenrow">
	
	<div class="method-header">
		<span class="method-title">spawn</span> (line <span class="line-number">146</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Create a site given its name and URL, and return it.</p>
<p class="description"><p>If site already exists, it will be retuned with no further action.</p></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"><a href="../noti/Site.html">object Site</a></span>
		<span class="method-name">
			spawn
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sname</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$surl</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sname</span><span class="var-description">: The site name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$surl</span><span class="var-description">: The site URL</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


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