mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 09:22:07 +01:00
849 lines
28 KiB
XML
849 lines
28 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d83aa96e679c4e4d63390a41063469e51107c331 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<chapter xml:id="filter.filters" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Types de filtres</title>
|
|
|
|
<!--Validate filters: {{{-->
|
|
<section xml:id="filter.filters.validate">
|
|
<title>Filtres de validation</title>
|
|
<para>
|
|
<table>
|
|
<title>Liste des filtre de validation</title>
|
|
<tgroup cols="5">
|
|
<thead>
|
|
<row>
|
|
<entry>ID</entry>
|
|
<entry>Nom</entry>
|
|
<entry>Options</entry>
|
|
<entry>Drapeaux</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_BOOLEAN</constant>,
|
|
<constant>FILTER_VALIDATE_BOOL</constant>
|
|
</entry>
|
|
<entry>"boolean"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
<para>
|
|
Retourne &true; pour <literal>"1"</literal>, <literal>"true"</literal>,
|
|
<literal>"on"</literal> et <literal>"yes"</literal>.
|
|
Retourne &false; sinon.
|
|
</para>
|
|
<para>
|
|
Si <constant>FILTER_NULL_ON_FAILURE</constant> est active, &false;
|
|
n'est retourné que pour les valeurs <literal>"0"</literal>,
|
|
<literal>"false"</literal>, <literal>"off"</literal>,
|
|
<literal>"no"</literal>, <literal>""</literal>, et &null;
|
|
est retourné pour les valeurs non-booléennes.
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_DOMAIN</constant></entry>
|
|
<entry>"validate_domain"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_HOSTNAME</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
<para>
|
|
Valide si les longueurs d'étiquettes de nom de domaine sont valides.
|
|
</para>
|
|
<para>
|
|
Valide les noms de domaine par rapport aux RFC 1034, RFC 1035,
|
|
RFC 952, RFC 1123, RFC 2732, RFC 2181 et RFC 1123. L'indicateur
|
|
facultatif <constant>FILTER_FLAG_HOSTNAME</constant> ajoute la
|
|
capacité de valider spécifiquement les noms d'hôte (ils doivent
|
|
commencer par un caractère alphanumériques et contenir uniquement
|
|
des caractères alphanumériques ou des traits d'union).
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_EMAIL</constant></entry>
|
|
<entry>"validate_email"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_EMAIL_UNICODE</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
<para>
|
|
Valide une adresse de courriel.
|
|
</para>
|
|
<para>
|
|
En général, ceci valide l'adresse de courriel selon la syntaxe
|
|
<literal>addr-spec</literal> dans la <link xlink:href="&url.rfc;822">RFC 822</link>,
|
|
à l'exception des commentaires, du remplissage par des espaces
|
|
et les noms de domaine sans point qui ne sont pas pris en charge.
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_FLOAT</constant></entry>
|
|
<entry>"float"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>,
|
|
<parameter>decimal</parameter>,
|
|
<parameter>min_range</parameter>,
|
|
<parameter>max_range</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
Valide un nombre décimal, optionnellement dans l'intervalle fourni, et
|
|
le convertit en nombre décimal en cas de succès.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_INT</constant></entry>
|
|
<entry>"int"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>,
|
|
<parameter>min_range</parameter>,
|
|
<parameter>max_range</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_ALLOW_OCTAL</constant>,
|
|
<constant>FILTER_FLAG_ALLOW_HEX</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>Valide un entier, éventuellement dans un intervalle donné et le
|
|
convertit en entier en cas de succès.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_IP</constant></entry>
|
|
<entry>"validate_ip"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_IPV4</constant>,
|
|
<constant>FILTER_FLAG_IPV6</constant>,
|
|
<constant>FILTER_FLAG_NO_PRIV_RANGE</constant>,
|
|
<constant>FILTER_FLAG_NO_RES_RANGE</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
Valide une adresse IP, éventuellement IPv4 ou IPv6,
|
|
éventuellement hors des plages privées ou réservées.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_MAC</constant></entry>
|
|
<entry>"validate_mac_address"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>Valide la valeur comme une adresse MAC.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_REGEXP</constant></entry>
|
|
<entry>"validate_regexp"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>,
|
|
<parameter>regexp</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>
|
|
Valide une valeur avec une expression rationnelle
|
|
<parameter>regexp</parameter>, <link linkend="book.pcre">compatible Perl</link>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_URL</constant></entry>
|
|
<entry>"validate_url"</entry>
|
|
<entry>
|
|
<parameter>default</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_SCHEME_REQUIRED</constant>,
|
|
<constant>FILTER_FLAG_HOST_REQUIRED</constant>,
|
|
<constant>FILTER_FLAG_PATH_REQUIRED</constant>,
|
|
<constant>FILTER_FLAG_QUERY_REQUIRED</constant>,
|
|
<constant>FILTER_NULL_ON_FAILURE</constant>
|
|
</entry>
|
|
<entry>Valide une URL (selon <link xlink:href="&url.rfc;2396">&url.rfc;2396</link>),
|
|
éventuellement avec des composants requis. Attention, une URL valide peut ne pas
|
|
spécifier le protocole HTTP <literal>http://</literal>, aussi, des validations
|
|
ultérieures supplémentaires seront requises pour déterminer si l'URL utilise un
|
|
protocole attendu, i.e. <literal>ssh://</literal> ou <literal>mailto:</literal>.
|
|
Cette fonction ne trouvera que des URLs ASCII valides, les domaines internationnalisés
|
|
(contenant des caractères non-ASCII) ne fonctionneront pas.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Lorsque le paramètre <parameter>default</parameter> est défini comme option,
|
|
la valeur passée est utilisée si la valeur n'est pas validée.
|
|
</para>
|
|
</note>
|
|
|
|
<simplesect role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
Ajout de <constant>FILTER_VALIDATE_BOOL</constant> qui est un alias pour <constant>FILTER_VALIDATE_BOOLEAN</constant>.
|
|
L'utilisation de <constant>FILTER_VALIDATE_BOOL</constant> est préféré.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.4.0</entry>
|
|
<entry>
|
|
Ajout des options <parameter>min_range</parameter> et
|
|
<parameter>max_range</parameter> pour
|
|
<constant>FILTER_VALIDATE_FLOAT</constant>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Ajout de <constant>FILTER_FLAG_HOSTNAME</constant> et <constant>FILTER_VALIDATE_DOMAIN</constant>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</simplesect>
|
|
|
|
</section>
|
|
<!--}}}-->
|
|
|
|
<!-- Sanitize filters: {{{-->
|
|
<section xml:id="filter.filters.sanitize">
|
|
<title>Filtres de nettoyage</title>
|
|
<para>
|
|
<table>
|
|
<title>Liste des filtres de nettoyage</title>
|
|
<tgroup cols="5">
|
|
<thead>
|
|
<row>
|
|
<entry>ID</entry>
|
|
<entry>Nom</entry>
|
|
<entry>Flags</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_EMAIL</constant></entry>
|
|
<entry>"email"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères sauf les lettres, chiffres, et
|
|
<literal>!#$%&'*+-=?^_`{|}~@.[]</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_ENCODED</constant></entry>
|
|
<entry>"encoded"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_STRIP_BACKTICK</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
|
|
</entry>
|
|
<entry>
|
|
Applique l'encodage URL, et supprime ou encode les caractères spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry>
|
|
<entry>"magic_quotes"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Applique <function>addslashes</function>.
|
|
(<emphasis>OBSOLÈte</emphasis> à partir de PHP 7.3.0 et
|
|
<emphasis>SUPPRIMÉE</emphasis> à partir de PHP 8.0.0,
|
|
utiliser <constant>FILTER_SANITIZE_ADD_SLASHES</constant> à la place.)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_ADD_SLASHES</constant></entry>
|
|
<entry>"add_slashes"</entry>
|
|
<entry></entry>
|
|
<entry>Applique <function>addslashes</function>. (Disponible à partir de PHP 7.3.0)</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry>
|
|
<entry>"number_float"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_ALLOW_FRACTION</constant>,
|
|
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>,
|
|
<constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime tous les caractères, sauf les chiffres, <literal>+-</literal> et
|
|
éventuellement <literal>.,eE</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry>
|
|
<entry>"number_int"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères sauf les chiffres, et les signes plus et moins.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry>
|
|
<entry>"special_chars"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_STRIP_BACKTICK</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
|
|
</entry>
|
|
<entry>
|
|
Transforme en entité HTML les caractères <literal>'"<>&</literal>
|
|
et les caractères ASCII de valeur inférieur à 32, et supprime ou encode
|
|
les autres caractères spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_FULL_SPECIAL_CHARS</constant></entry>
|
|
<entry>"full_special_chars"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>,
|
|
</entry>
|
|
<entry>
|
|
Équivaut à appeler la fonction <function>htmlspecialchars</function> avec
|
|
le jeu <constant>ENT_QUOTES</constant>. L'encodage des guillemets
|
|
peut être désactivé en utilisant la constante <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>.
|
|
Comme la fonction <function>htmlspecialchars</function>, ce filtre tient compte du
|
|
<link linkend="ini.default-charset">default_charset</link> et si une séquence d'octets est détectée
|
|
contenant un caractère invalide dans le jeu de caractères courant, alors la chaîne entière
|
|
sera rejetée et une chaîne vide sera retournée.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_STRING</constant></entry>
|
|
<entry>"string"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>,
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_STRIP_BACKTICK</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_AMP</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime les balises et transforme en entité HTML les guillemets simple et double,
|
|
optionnellement supprime ou encode les caractères spéciaux.
|
|
Encodage des guillemets peut être désactiver en définissant
|
|
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>.
|
|
(<emphasis>Obsolète</emphasis> à partir de PHP 8.1.0,
|
|
utilisez <function>htmlspecialchars</function> à la place)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry>
|
|
<entry>"stripped"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Alias du filtre <literal>"string"</literal>.
|
|
(<emphasis>Obsolète</emphasis> à partir de PHP 8.1.0,
|
|
utilisez <function>htmlspecialchars</function> à la place)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_URL</constant></entry>
|
|
<entry>"url"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères sauf les lettres, chiffres et
|
|
<literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_UNSAFE_RAW</constant></entry>
|
|
<entry>"unsafe_raw"</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_STRIP_BACKTICK</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_AMP</constant>
|
|
</entry>
|
|
<entry>
|
|
Ne fait rien, supprime ou encode les caractères spéciaux. Ce filtre
|
|
est aussi un alias pour <constant>FILTER_DEFAULT</constant>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
Lorsque vous utilisez ces filtres comme filtres par défaut, le drapeau par
|
|
défaut est réglé sur <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>. Vous devez
|
|
mettre filter.default_flags à 0 explicitement pour que les quotes soient encodées
|
|
par défaut. Comme ceci:
|
|
<example>
|
|
<title>Configurer le filtre par défaut pour agir comme htmlspecialchars</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
filter.default = full_special_chars
|
|
filter.default_flags = 0
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</warning>
|
|
|
|
<simplesect role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant> a été supprimée.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ADD_SLASHES</constant> a été ajouté comme
|
|
remplacement pour <constant>FILTER_SANITIZE_MAGIC_QUOTES</constant>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_MAGIC_QUOTES</constant> a été rendu obsolète.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</simplesect>
|
|
|
|
</section>
|
|
<!--}}}-->
|
|
|
|
<!-- Other filters: {{{-->
|
|
<section xml:id="filter.filters.misc">
|
|
<title>Autres filtres</title>
|
|
<para>
|
|
<table>
|
|
<title>Liste de filtres divers</title>
|
|
<tgroup cols="5">
|
|
<thead>
|
|
<row>
|
|
<entry>ID</entry>
|
|
<entry>Nom</entry>
|
|
<entry>Options</entry>
|
|
<entry>Flags</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>FILTER_CALLBACK</constant></entry>
|
|
<entry>"callback"</entry>
|
|
<entry>Fonction ou méthode de rappel (type <type>callable</type>)</entry>
|
|
<entry>Tous les drapeaux sont ignorés</entry>
|
|
<entry>Appelle une fonction utilisateur pour filtrer les données.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</section>
|
|
<!--}}}-->
|
|
|
|
<!-- Filter flags: {{{-->
|
|
<section xml:id="filter.filters.flags">
|
|
<title>Drapeaux des filtres</title>
|
|
|
|
<para>
|
|
<table>
|
|
<title>Liste de drapeaux de filtres</title>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry>ID</entry>
|
|
<entry>Utilisé avec</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_STRIP_LOW</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ENCODED</constant>,
|
|
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_UNSAFE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime les caractères dont la valeur numérique est <32.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_STRIP_HIGH</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ENCODED</constant>,
|
|
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_UNSAFE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime les caractères dont la valeur numérique est >127.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_STRIP_BACKTICK</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ENCODED</constant>,
|
|
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_UNSAFE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime les caractères "accent grave".
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ALLOW_FRACTION</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>
|
|
</entry>
|
|
<entry>
|
|
Autorise un point (<literal>.</literal>) comme séparateur fractionnaire
|
|
pour les nombres.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ALLOW_THOUSAND</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>,
|
|
<constant>FILTER_VALIDATE_FLOAT</constant>
|
|
</entry>
|
|
<entry>
|
|
Autorise une virgule (<literal>,</literal>) comme séparateur fractionnaire
|
|
pour les nombres.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_NUMBER_FLOAT</constant>
|
|
</entry>
|
|
<entry>
|
|
Autorise un <literal>e</literal> ou un <literal>E</literal> pour la notation
|
|
scientifique dans les nombres.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_STRING</constant>
|
|
</entry>
|
|
<entry>
|
|
Si ce drapeau est présent, les simples quotes (<literal>'</literal>) et les doubles
|
|
(<literal>"</literal>) ne seront pas encodées.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ENCODE_LOW</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ENCODED</constant>,
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_SANITIZE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Encode tous les caractères dont la valeur numérique est <32.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ENCODE_HIGH</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_ENCODED</constant>,
|
|
<constant>FILTER_SANITIZE_SPECIAL_CHARS</constant>,
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_SANITIZE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Encode tous les caractères dont la valeur numérique est >127.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ENCODE_AMP</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_SANITIZE_STRING</constant>,
|
|
<constant>FILTER_SANITIZE_RAW</constant>
|
|
</entry>
|
|
<entry>
|
|
Encode les <literal>&</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_NULL_ON_FAILURE</constant></entry>
|
|
<entry>
|
|
N'importe quel <link linkend="filter.filters.validate"><constant>FILTER_VALIDATE_*</constant></link>
|
|
</entry>
|
|
<entry>
|
|
Retourne &null; pour les valeurs non reconnues.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ALLOW_OCTAL</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_INT</constant>
|
|
</entry>
|
|
<entry>
|
|
Prend en compte les nombres octals précédés d'un zéro (<literal>0</literal>).
|
|
Ceci ne fonctionne que pour les chiffres <literal>0-7</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_ALLOW_HEX</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_INT</constant>
|
|
</entry>
|
|
<entry>
|
|
Prend en compte les nombres héxadécimaux précédés de <literal>0x</literal> ou
|
|
<literal>0X</literal>. Ceci ne fonctionne que pour <literal>a-fA-F0-9</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_EMAIL_UNICODE</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_EMAIL</constant>
|
|
</entry>
|
|
<entry>
|
|
Permet à la partie locale de l'adresse électronique de contenir des caractères Unicode.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_IPV4</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_IP</constant>
|
|
</entry>
|
|
<entry>
|
|
Autorise une adresse IP au format IPv4.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_IPV6</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_IP</constant>
|
|
</entry>
|
|
<entry>
|
|
Autorise une adresse IP au format IPv6.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_NO_PRIV_RANGE</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_IP</constant>
|
|
</entry>
|
|
<entry>
|
|
<para>
|
|
Échoue la validation pour les intervalles privés IPv4:
|
|
<literal>10.0.0.0/8</literal>, <literal>172.16.0.0/12</literal> et
|
|
<literal>192.168.0.0/16</literal>.
|
|
</para>
|
|
<para>
|
|
Échoue la validation pour les adresses IPv6 commençant par
|
|
<literal>FD</literal> ou <literal>FC</literal>.
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_NO_RES_RANGE</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_IP</constant>
|
|
</entry>
|
|
<entry>
|
|
<para>
|
|
Échoue la validation pour les intervalles IPv4 réservés :
|
|
<literal>0.0.0.0/8</literal>, <literal>169.254.0.0/16</literal>,
|
|
<literal>127.0.0.0/8</literal> et <literal>240.0.0.0/4</literal>.
|
|
Ce drapeau ne concerne pas les adresses IPv6.
|
|
</para>
|
|
<para>
|
|
Échoue la validation pour les intervalles IPv6 réservés :
|
|
<literal>::1/128</literal>, <literal>::/128</literal>,
|
|
<literal>::ffff:0:0/96</literal> and <literal>fe80::/10</literal>.
|
|
</para>
|
|
<para>
|
|
Ce sont les intervalles qui sont marquée comme Reserved-By-Protocol
|
|
dans la <link xlink:href="&url.rfc;6890">RFC 6890</link>.
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_SCHEME_REQUIRED</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_URL</constant>
|
|
</entry>
|
|
<entry>
|
|
Requière de l'<acronym>URL</acronym> qu'elle contienne une partie schéma.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_HOST_REQUIRED</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_URL</constant>
|
|
</entry>
|
|
<entry>
|
|
Requière de l'<acronym>URL</acronym> qu'elle contienne une partie hôte.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_PATH_REQUIRED</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_URL</constant>
|
|
</entry>
|
|
<entry>
|
|
Oblige <acronym>URL</acronym> à contenir un chemin.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FLAG_QUERY_REQUIRED</constant></entry>
|
|
<entry>
|
|
<constant>FILTER_VALIDATE_URL</constant>
|
|
</entry>
|
|
<entry>
|
|
Oblige <acronym>URL</acronym> à contenir une chaine de requête.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_REQUIRE_SCALAR</constant></entry>
|
|
<entry>
|
|
</entry>
|
|
<entry>
|
|
Oblige la valeur à être un scalaire.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_REQUIRE_ARRAY</constant></entry>
|
|
<entry>
|
|
</entry>
|
|
<entry>
|
|
Oblige la valeur à être un tableau.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_FORCE_ARRAY</constant></entry>
|
|
<entry>
|
|
</entry>
|
|
<entry>
|
|
Si la valeur est un scalaire, elle sera traitée comme un tableau
|
|
avec les valeurs scalaires comme seul élément.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
<simplesect role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
L'usage explicite de <constant>FILTER_FLAG_SCHEME_REQUIRED</constant>
|
|
et <constant>FILTER_FLAG_HOST_REQUIRED</constant> ont été déprécié.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.1.0</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_EMAIL_UNICODE</constant> a été ajouté.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</simplesect>
|
|
</section>
|
|
<!--}}}-->
|
|
</chapter>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|