Location: PHPKode > projects > DIY Blog > diy-blog/lib/diy-framework/docs/diy-framework/controller/Request.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 Request</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 Request</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-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Provides HTTP request information such as headers, query parameters etc.</p>
<p class="description"><p>Wraps PHP's functions and global arrays to emulate Java's HttpServletRequest interface. That means it can only be used to represent the &quot;current&quot; request.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Martynas Jusevicius &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">link:</span> <a href="http://www.xml.lt">http://www.xml.lt</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_diy-framework---controller---Request.class.php.html">/diy-framework/controller/Request.class.php</a> (line <span class="field">12</span>)
		</p>
		
				
		<pre></pre>
	
			</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> |
												<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">
					static 						<span class="method-result"><a href="../../diy-framework/controller/Request.html">Request</a></span>
										<a href="#getInstance" title="details" class="method-name">getInstance</a>
										()
									</div>
																																																																
												<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#getAttribute" title="details" class="method-name">getAttribute</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getHeader" title="details" class="method-name">getHeader</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																								<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getMethod" title="details" class="method-name">getMethod</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getParameter" title="details" class="method-name">getParameter</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getParameterMap" title="details" class="method-name">getParameterMap</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getPathInfo" title="details" class="method-name">getPathInfo</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getRequestURI" title="details" class="method-name">getRequestURI</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../../diy-framework/controller/Session.html">Session</a></span>
										<a href="#getSession" title="details" class="method-name">getSession</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setAttribute" title="details" class="method-name">setAttribute</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
								</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-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method getInstance</span> (line <span class="line-number">123</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns instance of self (Request object). Used to implement Singleton pattern.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../diy-framework/controller/Request.html">Request</a></span>
		<span class="method-name">
			getInstance
		</span>
				()
			</div>
	
		
			
	</div>

<a name="methodgetAttribute" id="getAttribute"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAttribute</span> (line <span class="line-number">42</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a request attribute, or null if it does not exist. They are used to save and share data between components in a context of a single request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Attribute</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			getAttribute
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: Name of the attribute</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetHeader" id="getHeader"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getHeader</span> (line <span class="line-number">100</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a HTTP request header, or null if it does not exist.</p>
<p class="description"><p>Header names are the same as in PHP's $_SERVER[].</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Value of the header</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getHeader
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: Name of the header</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetMethod" id="getMethod"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getMethod</span> (line <span class="line-number">87</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a HTTP method (GET/POST/PUT/DELETE etc.) of this request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Request method</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getMethod
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetParameter" id="getParameter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getParameter</span> (line <span class="line-number">65</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a HTTP request parameter (from both GET and POST) as a string, or null if it does not exist.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Value of the parameter</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getParameter
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: Name of the parameter</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetParameterMap" id="getParameterMap"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getParameterMap</span> (line <span class="line-number">134</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a map (array with keys) of parameters of this Request.</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">
			getParameterMap
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetPathInfo" id="getPathInfo"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getPathInfo</span> (line <span class="line-number">145</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns Returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the servlet path but precedes the query string. This method returns null if there was no extra path information.</p>
<p class="description"><p>Same as the value of the CGI variable PATH_INFO.</p></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">
			getPathInfo
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRequestURI" id="getRequestURI"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getRequestURI</span> (line <span class="line-number">156</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.</p>
<p class="description"><p>Same as the value of the CGI variable REQUEST_URI.</p></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">
			getRequestURI
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetSession" id="getSession"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getSession</span> (line <span class="line-number">112</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the current Session object associated with this Request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Session</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../diy-framework/controller/Session.html">Session</a></span>
		<span class="method-name">
			getSession
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetAttribute" id="setAttribute"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setAttribute</span> (line <span class="line-number">54</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets a request attribute. They are used to save and share data between components in a context of a single request.</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">
			setAttribute
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: Name of the attribute</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: Value of the attribute</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 25 Sep 2007 11:17:22 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>
Return current item: DIY Blog