phpdoc/Library/HttpFundamental/Request.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Library\HttpFundamental\Request | Library</title>
<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../../css/sami.css">
<script src="../../js/jquery-1.11.1.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/typeahead.min.js"></script>
<script src="../../sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="class" data-name="class:Library_HttpFundamental_Request" data-root-path="../../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">Library</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../../classes.html">Classes</a></li>
<li><a href="../../namespaces.html">Namespaces</a></li>
<li><a href="../../interfaces.html">Interfaces</a></li>
<li><a href="../../traits.html">Traits</a></li>
<li><a href="../../doc-index.html">Index</a></li>
<li><a href="../../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">class</span></li>
<li><a href="../../Library.html">Library</a></li>
<li><a href="../../Library/HttpFundamental.html">HttpFundamental</a></li>
<li>Request</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>Request</h1>
</div>
<p> class
<strong>Request</strong> implements
<abbr title="Patterns\Interfaces\RequestInterface">RequestInterface</abbr>
</p>
<div class="description">
<p>The global request class</p> </div>
<h2>Constants</h2>
<table class="table table-condensed">
<tr>
<td>NO_REWRITE</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
<tr>
<td>REWRITE_SEGMENTS_QUERY</td>
<td class="last">
<p><em>
</em></p>
<p>
</p>
</td>
</tr>
</table>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
static
<a href="../../Library/HttpFundamental/Request.html"><abbr title="Library\HttpFundamental\Request">Request</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_create">create</a>(
string $url = null,
int $flag = self::NO_REWRITE,
string $protocol = 'http',
string $method = 'get',
array $headers = null,
array $arguments = null,
array $data = null,
array $session = null,
array $files = null,
array $cookies = null)
<p>Static constructor : defines the current URL and gets the routes</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method___construct">__construct</a>(
string $url = null,
int $flag = self::NO_REWRITE)
<p>Constructor : defines the request URL and the object rewrite flag</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_guessFromCurrent">guessFromCurrent</a>()
<p>Populate the request object with current HTTP request values</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setFlag">setFlag</a>(
int $flag)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
int
</div>
<div class="col-md-8 type">
<a href="#method_getFlag">getFlag</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setUrl">setUrl</a>(
string $url)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string|null
</div>
<div class="col-md-8 type">
<a href="#method_getUrl">getUrl</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setProtocol">setProtocol</a>(
string $protocol)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string|null
</div>
<div class="col-md-8 type">
<a href="#method_getProtocol">getProtocol</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setMethod">setMethod</a>(
string $method)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string|null
</div>
<div class="col-md-8 type">
<a href="#method_getMethod">getMethod</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setHeaders">setHeaders</a>(
array $headers = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getHeaders">getHeaders</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string|null
</div>
<div class="col-md-8 type">
<a href="#method_getHeader">getHeader</a>(
string $name)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setArguments">setArguments</a>(
string|array $arguments = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getArguments">getArguments</a>(
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_getArgument">getArgument</a>(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setData">setData</a>(
array|string $data = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_getData">getData</a>(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setFiles">setFiles</a>(
array $files = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getFiles">getFiles</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getFile">getFile</a>(
string $param,
string $index = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setSession">setSession</a>(
array $session = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getSession">getSession</a>(
string $param = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setCookies">setCookies</a>(
array $cookies = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getCookies">getCookies</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|null
</div>
<div class="col-md-8 type">
<a href="#method_getCookie">getCookie</a>(
string $param)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setAuthentication">setAuthentication</a>(
array $authentication = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setAuthenticationType">setAuthenticationType</a>(
string $type)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setAuthenticationUser">setAuthenticationUser</a>(
string $user)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="Library\HttpFundamental\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_setAuthenticationPassword">setAuthenticationPassword</a>(
string $pw)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array|string|null
</div>
<div class="col-md-8 type">
<a href="#method_getAuthentication">getAuthentication</a>(
string $param = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildUrl">buildUrl</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
bool
</div>
<div class="col-md-8 type">
<a href="#method_isAjax">isAjax</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
bool
</div>
<div class="col-md-8 type">
<a href="#method_isCli">isCli</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
bool
</div>
<div class="col-md-8 type">
<a href="#method_isGet">isGet</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
bool
</div>
<div class="col-md-8 type">
<a href="#method_isPost">isPost</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
bool
</div>
<div class="col-md-8 type">
<a href="#method_isPut">isPut</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_getGet">getGet</a>(
string $varname,
mixed $default = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_getPost">getPost</a>(
string $varname,
mixed $default = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_getGetOrPost">getGetOrPost</a>(
string $varname,
mixed $default = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_getPostOrGet">getPostOrGet</a>(
string $varname,
mixed $default = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_cleanArgument">cleanArgument</a>(
string $arg_value,
int $flags = ENT_COMPAT,
string $encoding = 'UTF-8')
<p>Clean the value taken from request arguments or data</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_getEnvironment">getEnvironment</a>(
string $varname)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_getClientIp">getClientIp</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
</div>
<div class="col-md-8 type">
<a href="#method_getallheaders">getallheaders</a>()
<p>Emulation of internal <code>getallheaders()</code> function as it does not exist each time</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_create">
<div class="location">at line 122</div>
<code> static
<a href="../../Library/HttpFundamental/Request.html"><abbr title="Library\HttpFundamental\Request">Request</abbr></a>
<strong>create</strong>(
string $url = null,
int $flag = self::NO_REWRITE,
string $protocol = 'http',
string $method = 'get',
array $headers = null,
array $arguments = null,
array $data = null,
array $session = null,
array $files = null,
array $cookies = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Static constructor : defines the current URL and gets the routes</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$url</td>
<td>
</td>
</tr>
<tr>
<td>
int</td>
<td>$flag</td>
<td>
</td>
</tr>
<tr>
<td>
string</td>
<td>$protocol</td>
<td>
</td>
</tr>
<tr>
<td>
string</td>
<td>$method</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$headers</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$arguments</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$data</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$session</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$files</td>
<td>
</td>
</tr>
<tr>
<td>
array</td>
<td>$cookies</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../../Library/HttpFundamental/Request.html"><abbr title="Library\HttpFundamental\Request">Request</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method___construct">
<div class="location">at line 151</div>
<code>
<strong>__construct</strong>(
string $url = null,
int $flag = self::NO_REWRITE)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Constructor : defines the request URL and the object rewrite flag</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$url</td>
<td>
</td>
</tr>
<tr>
<td>
int</td>
<td>$flag</td>
<td>Must be one of the class <code>REWRITE</code> constants</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_guessFromCurrent">
<div class="location">at line 167</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>guessFromCurrent</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Populate the request object with current HTTP request values</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
<h4>See also</h4>
<table class="table table-condensed">
<tr>
<td>\Library\Helper\Url::getRequestUrl()</td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setFlag">
<div class="location">at line 194</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setFlag</strong>(
int $flag)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
int</td>
<td>$flag</td>
<td>Must be one of the class <code>REWRITE</code> constants</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getFlag">
<div class="location">at line 203</div>
<code>
int
<strong>getFlag</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
int</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setUrl">
<div class="location">at line 212</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setUrl</strong>(
string $url)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$url</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getUrl">
<div class="location">at line 221</div>
<code>
string|null
<strong>getUrl</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setProtocol">
<div class="location">at line 230</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setProtocol</strong>(
string $protocol)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$protocol</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getProtocol">
<div class="location">at line 239</div>
<code>
string|null
<strong>getProtocol</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setMethod">
<div class="location">at line 248</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setMethod</strong>(
string $method)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$method</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getMethod">
<div class="location">at line 257</div>
<code>
string|null
<strong>getMethod</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setHeaders">
<div class="location">at line 266</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setHeaders</strong>(
array $headers = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$headers</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getHeaders">
<div class="location">at line 275</div>
<code>
array|null
<strong>getHeaders</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getHeader">
<div class="location">at line 284</div>
<code>
string|null
<strong>getHeader</strong>(
string $name)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$name</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setArguments">
<div class="location">at line 293</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setArguments</strong>(
string|array $arguments = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string|array</td>
<td>$arguments</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getArguments">
<div class="location">at line 311</div>
<code>
array|null
<strong>getArguments</strong>(
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>$clean</td>
<td>Clean the argument before return ? (default is true)</td>
</tr>
<tr>
<td>
int</td>
<td>$clean_flags</td>
<td>The PHP flags used with <code>htmlspecialchars()</code> (default is ENT_COMPAT)</td>
</tr>
<tr>
<td>
string</td>
<td>$clean_encoding</td>
<td>The encoding used with <code>htmlspecialchars()</code> (default is UTF-8)</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getArgument">
<div class="location">at line 325</div>
<code>
string
<strong>getArgument</strong>(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>The parameter name if so, or 'args' to get all parameters values</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>The default value sent if the argument is not set</td>
</tr>
<tr>
<td>
bool</td>
<td>$clean</td>
<td>Clean the argument before return ? (default is true)</td>
</tr>
<tr>
<td>
int</td>
<td>$clean_flags</td>
<td>The PHP flags used with <code>htmlspecialchars()</code> (default is ENT_COMPAT)</td>
</tr>
<tr>
<td>
string</td>
<td>$clean_encoding</td>
<td>The encoding used with <code>htmlspecialchars()</code> (default is UTF-8)</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The value retrieved, $default otherwise</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setData">
<div class="location">at line 338</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setData</strong>(
array|string $data = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array|string</td>
<td>$data</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getData">
<div class="location">at line 355</div>
<code>
string
<strong>getData</strong>(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>The parameter name if so, or 'args' to get all parameters values</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>The default value sent if the argument is not set</td>
</tr>
<tr>
<td>
bool</td>
<td>$clean</td>
<td>Clean the argument before return ? (default is true)</td>
</tr>
<tr>
<td>
int</td>
<td>$clean_flags</td>
<td>The PHP flags used with <code>htmlspecialchars()</code> (default is ENT_COMPAT)</td>
</tr>
<tr>
<td>
string</td>
<td>$clean_encoding</td>
<td>The encoding used with <code>htmlspecialchars()</code> (default is UTF-8)</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The value retrieved, $default otherwise</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setFiles">
<div class="location">at line 373</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setFiles</strong>(
array $files = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$files</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getFiles">
<div class="location">at line 382</div>
<code>
array|null
<strong>getFiles</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getFile">
<div class="location">at line 392</div>
<code>
array|null
<strong>getFile</strong>(
string $param,
string $index = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>
</td>
</tr>
<tr>
<td>
string</td>
<td>$index</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setSession">
<div class="location">at line 408</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setSession</strong>(
array $session = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$session</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getSession">
<div class="location">at line 418</div>
<code>
array|null
<strong>getSession</strong>(
string $param = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setCookies">
<div class="location">at line 431</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setCookies</strong>(
array $cookies = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$cookies</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getCookies">
<div class="location">at line 440</div>
<code>
array|null
<strong>getCookies</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getCookie">
<div class="location">at line 449</div>
<code>
array|null
<strong>getCookie</strong>(
string $param)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setAuthentication">
<div class="location">at line 458</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setAuthentication</strong>(
array $authentication = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$authentication</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setAuthenticationType">
<div class="location">at line 468</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setAuthenticationType</strong>(
string $type)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$type</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setAuthenticationUser">
<div class="location">at line 478</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setAuthenticationUser</strong>(
string $user)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$user</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_setAuthenticationPassword">
<div class="location">at line 488</div>
<code>
<abbr title="Library\HttpFundamental\$this">$this</abbr>
<strong>setAuthenticationPassword</strong>(
string $pw)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$pw</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getAuthentication">
<div class="location">at line 498</div>
<code>
array|string|null
<strong>getAuthentication</strong>(
string $param = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$param</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array|string|null</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildUrl">
<div class="location">at line 514</div>
<code>
string
<strong>buildUrl</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isAjax">
<div class="location">at line 555</div>
<code> static
bool
<strong>isAjax</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isCli">
<div class="location">at line 564</div>
<code>
bool
<strong>isCli</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isGet">
<div class="location">at line 572</div>
<code>
bool
<strong>isGet</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isPost">
<div class="location">at line 580</div>
<code>
bool
<strong>isPost</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isPut">
<div class="location">at line 588</div>
<code>
bool
<strong>isPut</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getGet">
<div class="location">at line 598</div>
<code>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
<strong>getGet</strong>(
string $varname,
mixed $default = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$varname</td>
<td>
</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getPost">
<div class="location">at line 608</div>
<code>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
<strong>getPost</strong>(
string $varname,
mixed $default = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$varname</td>
<td>
</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getGetOrPost">
<div class="location">at line 618</div>
<code>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
<strong>getGetOrPost</strong>(
string $varname,
mixed $default = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$varname</td>
<td>
</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getPostOrGet">
<div class="location">at line 632</div>
<code>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
<strong>getPostOrGet</strong>(
string $varname,
mixed $default = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$varname</td>
<td>
</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_cleanArgument">
<div class="location">at line 693</div>
<code> static
string
<strong>cleanArgument</strong>(
string $arg_value,
int $flags = ENT_COMPAT,
string $encoding = 'UTF-8')</code>
</h3>
<div class="details">
<div class="method-description">
<p>Clean the value taken from request arguments or data</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$arg_value</td>
<td>The parameter name if so, or 'args' to get all parameters values</td>
</tr>
<tr>
<td>
int</td>
<td>$flags</td>
<td>The PHP flags used with htmlspecialchars() (default is ENT_COMPAT)</td>
</tr>
<tr>
<td>
string</td>
<td>$encoding</td>
<td>The encoding used with htmlspecialchars() (default is UTF-8)</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The cleaned value</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getEnvironment">
<div class="location">at line 710</div>
<code> static
mixed|<abbr title="Library\HttpFundamental\false">false</abbr>
<strong>getEnvironment</strong>(
string $varname)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$varname</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed|<abbr title="Library\HttpFundamental\false">false</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getClientIp">
<div class="location">at line 718</div>
<code> static
string
<strong>getClientIp</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getallheaders">
<div class="location">at line 733</div>
<code> static
<strong>getallheaders</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Emulation of internal <code>getallheaders()</code> function as it does not exist each time</p> </div>
<div class="tags">
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>