phpdoc/Library/HttpFundamental/ContentType.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Library\HttpFundamental\ContentType | 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_ContentType" 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>ContentType</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>ContentType</h1>
</div>
<p> class
<strong>ContentType</strong>
</p>
<h2>Properties</h2>
<table class="table table-condensed">
<tr>
<td class="type" id="property_content_types">
static
</td>
<td>$content_types</td>
<td class="last">
</td>
<td></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/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_createFromContent">createFromContent</a>(
string $content)
<p>Create a new ContentType object extracting the type from a content string</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_guessContentType">guessContentType</a>(
string $content)
<p class="no-description">No description</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 $content_type)
<p>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">
string
</div>
<div class="col-md-8 type">
<a href="#method___toString">__toString</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">
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_setContentType">setContentType</a>(
string $content_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">
string
</div>
<div class="col-md-8 type">
<a href="#method_getContentType">getContentType</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">
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_setContentTypeObject">setContentTypeObject</a>(
<abbr title="Library\HttpFundamental\Library\HttpFundamental\ContentTypeInterface">ContentTypeInterface</abbr> $content_type_object)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
object|null
</div>
<div class="col-md-8 type">
<a href="#method_getContentTypeObject">getContentTypeObject</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">
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_prepareContentType">prepareContentType</a>(
string $content_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">
void
</div>
<div class="col-md-8 type">
<a href="#method_prepareResponse">prepareResponse</a>(
<abbr title="Library\HttpFundamental\Library\HttpFundamental\Response">Response</abbr> $response)
<p>Prepare the content of the response before to send it to client</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed
</div>
<div class="col-md-8 type">
<a href="#method_parseContent">parseContent</a>(
string $content)
<p>Parse an input content</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_prepareContent">prepareContent</a>(
mixed $content)
<p>Prepare a content for output</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_createFromContent">
<div class="location">at line 62</div>
<code> static
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
<strong>createFromContent</strong>(
string $content)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Create a new ContentType object extracting the type from a content string</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_guessContentType">
<div class="location">at line 71</div>
<code> static
string
<strong>guessContentType</strong>(
string $content)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content</td>
<td>
</td>
</tr>
</table>
<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___construct">
<div class="location">at line 82</div>
<code>
<strong>__construct</strong>(
string $content_type)</code>
</h3>
<div class="details">
<div class="method-description">
<p>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>$content_type</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method___toString">
<div class="location">at line 90</div>
<code>
string
<strong>__toString</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_setContentType">
<div class="location">at line 104</div>
<code>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
<strong>setContentType</strong>(
string $content_type)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content_type</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a></td>
<td>
</td>
</tr>
</table>
<h4>Exceptions</h4>
<table class="table table-condensed">
<tr>
<td><a target="_blank" href="http://php.net/Exception"><abbr title="Exception">Exception</abbr></a></td>
<td>if the content_type was not declared and unknown</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getContentType">
<div class="location">at line 121</div>
<code>
string
<strong>getContentType</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_setContentTypeObject">
<div class="location">at line 130</div>
<code>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
<strong>setContentTypeObject</strong>(
<abbr title="Library\HttpFundamental\Library\HttpFundamental\ContentTypeInterface">ContentTypeInterface</abbr> $content_type_object)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\Library\HttpFundamental\ContentTypeInterface">ContentTypeInterface</abbr></td>
<td>$content_type_object</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getContentTypeObject">
<div class="location">at line 140</div>
<code>
object|null
<strong>getContentTypeObject</strong>()</code>
</h3>
<div class="details">
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
object|null</td>
<td>Object implementing the <code>\Library\HttpFundamental\ContentTypeInterface</code></td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_prepareContentType">
<div class="location">at line 153</div>
<code>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a>
<strong>prepareContentType</strong>(
string $content_type)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content_type</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../../Library/HttpFundamental/ContentType.html"><abbr title="Library\HttpFundamental\ContentType">ContentType</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_prepareResponse">
<div class="location">at line 169</div>
<code>
void
<strong>prepareResponse</strong>(
<abbr title="Library\HttpFundamental\Library\HttpFundamental\Response">Response</abbr> $response)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Prepare the content of the response before to send it to client</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="Library\HttpFundamental\Library\HttpFundamental\Response">Response</abbr></td>
<td>$response</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
void</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_parseContent">
<div class="location">at line 186</div>
<code>
mixed
<strong>parseContent</strong>(
string $content)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Parse an input content</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_prepareContent">
<div class="location">at line 202</div>
<code>
string
<strong>prepareContent</strong>(
mixed $content)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Prepare a content for output</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
mixed</td>
<td>$content</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</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>