phpdoc/Validator/HostnameValidator.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Validator\HostnameValidator | Validators</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:Validator_HostnameValidator" 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">Validators</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="../Validator.html">Validator</a></li>
<li>HostnameValidator</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>HostnameValidator</h1>
</div>
<p> class
<strong>HostnameValidator</strong> extends <a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a> implements
<a href="../Validator/ValidatorInterface.html"><abbr title="Validator\ValidatorInterface">ValidatorInterface</abbr></a>
</p>
<div class="description">
<p>Email address validator</p> </div>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_setMasks">setMasks</a>(
array $masks)
<p>Register a new mask set</p> </div>
<div class="col-md-2"><small>from
<a href="../Validator/AbstractMasksValidatorHelper.html#method_setMasks"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></small></div>
</div>
<div class="row">
<div class="col-md-2 type">
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a>
</div>
<div class="col-md-8 type">
<a href="#method_addMask">addMask</a>(
string $mask_name,
string $mask)
<p>Register a new mask</p> </div>
<div class="col-md-2"><small>from
<a href="../Validator/AbstractMasksValidatorHelper.html#method_addMask"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></small></div>
</div>
<div class="row">
<div class="col-md-2 type">
array
</div>
<div class="col-md-8 type">
<a href="#method_getMasks">getMasks</a>()
<p>Get the masks registry</p> </div>
<div class="col-md-2"><small>from
<a href="../Validator/AbstractMasksValidatorHelper.html#method_getMasks"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></small></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_getMask">getMask</a>(
string $mask_name)
<p>Get a registered mask</p> </div>
<div class="col-md-2"><small>from
<a href="../Validator/AbstractMasksValidatorHelper.html#method_getMask"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></small></div>
</div>
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method___construct">__construct</a>()
<p>Constructor : register useful masks</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_validate">validate</a>(
string $value,
bool $send_errors = false)
<p>Process validation</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_sanitize">sanitize</a>(
mixed $value)
<p>Try to make $value pass the validation</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_setMustPass">setMustPass</a>(
string $ref)
<p>Defines the RFC to validate</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_setMasks">
<div class="location">in
<a href="../Validator/AbstractMasksValidatorHelper.html#method_setMasks"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a> at line 44</div>
<code>
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a>
<strong>setMasks</strong>(
array $masks)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Register a new mask set</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$masks</td>
<td>The mask table as name=>mask pairs</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_addMask">
<div class="location">in
<a href="../Validator/AbstractMasksValidatorHelper.html#method_addMask"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a> at line 57</div>
<code>
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a>
<strong>addMask</strong>(
string $mask_name,
string $mask)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Register a new mask</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$mask_name</td>
<td>The mask name to set</td>
</tr>
<tr>
<td>
string</td>
<td>$mask</td>
<td>The mask value to set</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<a href="../Validator/AbstractMasksValidatorHelper.html"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getMasks">
<div class="location">in
<a href="../Validator/AbstractMasksValidatorHelper.html#method_getMasks"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a> at line 68</div>
<code>
array
<strong>getMasks</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Get the masks registry</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>The masks array</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getMask">
<div class="location">in
<a href="../Validator/AbstractMasksValidatorHelper.html#method_getMask"><abbr title="Validator\AbstractMasksValidatorHelper">AbstractMasksValidatorHelper</abbr></a> at line 79</div>
<code>
string
<strong>getMask</strong>(
string $mask_name)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Get a registered mask</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$mask_name</td>
<td>The name of the mask to get</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The value registered for the mask name, an empty string if it has not been found</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method___construct">
<div class="location">at line 44</div>
<code>
<strong>__construct</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Constructor : register useful masks</p> </div>
<div class="tags">
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_validate">
<div class="location">at line 64</div>
<code>
bool
<strong>validate</strong>(
string $value,
bool $send_errors = false)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Process validation</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$value</td>
<td>The value to validate</td>
</tr>
<tr>
<td>
bool</td>
<td>$send_errors</td>
<td>Does the function must throw exceptions on validation failures ?</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
bool</td>
<td>TRUE if <code>$value</code> passes the validation</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>for each invalid part if <code>$send_errors</code> is true</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_sanitize">
<div class="location">at line 134</div>
<code>
mixed
<strong>sanitize</strong>(
mixed $value)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Try to make $value pass the validation</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
mixed</td>
<td>$value</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_setMustPass">
<div class="location">at line 145</div>
<code>
<strong>setMustPass</strong>(
string $ref)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Defines the RFC to validate</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$ref</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 <code>$ref</code> is not a known RFC</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>