mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-23 08:38:06 +02:00
dc1e647602
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@260775 c90b9560-bf6c-de11-be94-00142212c4b1
295 lines
9.5 KiB
XML
295 lines
9.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- Purpose: basic.vartype -->
|
|
|
|
<book xml:id="book.filter" xmlns="http://docbook.org/ns/docbook">
|
|
<title>Filtrage des données</title>
|
|
<titleabbrev>Filter</titleabbrev>
|
|
|
|
<preface xml:id="intro.filter">
|
|
&reftitle.intro;
|
|
<para>
|
|
Cette extension permet de valider et de filtrer les données issues
|
|
de source non sécurisée, comme les entrées des utilisateurs.
|
|
</para>
|
|
<para>
|
|
Les filtres suivants existent ; assurez-vous de lire la section
|
|
concernant les <link linkend="filter.constants">constantes</link>
|
|
pour une description de chacune d'elles:
|
|
<table>
|
|
<title>Filtres existants</title>
|
|
<tgroup cols="5">
|
|
<thead>
|
|
<row>
|
|
<entry>ID</entry>
|
|
<entry>Nom</entry>
|
|
<entry>Options</entry>
|
|
<entry>Valeurs</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_INT</constant></entry>
|
|
<entry>"int"</entry>
|
|
<entry>
|
|
<parameter>min_range</parameter>,
|
|
<parameter>max_range</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_ALLOW_OCTAL</constant>,
|
|
<constant>FILTER_FLAG_ALLOW_HEX</constant>
|
|
</entry>
|
|
<entry>
|
|
Valide les valeurs en tant qu'entier, optionnellement depuis l'intervalle
|
|
spécifié.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry>
|
|
<entry>"boolean"</entry>
|
|
<entry></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 défini, &false;
|
|
est retourné uniquement pour <literal>"0"</literal>, <literal>"false"</literal>,
|
|
<literal>"off"</literal>, <literal>"no"</literal>, et <literal>""</literal> ;
|
|
&null; sera retourné pour toutes les valeurs non booléennes.
|
|
</para>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_FLOAT</constant></entry>
|
|
<entry>"float"</entry>
|
|
<entry>
|
|
<parameter>decimal</parameter>
|
|
</entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_ALLOW_THOUSAND</constant>
|
|
</entry>
|
|
<entry>Valide les valeurs en tant que &float;.</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_REGEXP</constant></entry>
|
|
<entry>"validate_regexp"</entry>
|
|
<entry>
|
|
<parameter>regexp</parameter>
|
|
</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Valide les valeurs suivant l'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></entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_PATH_REQUIRED</constant>,
|
|
<constant>FILTER_FLAG_QUERY_REQUIRED</constant>
|
|
</entry>
|
|
<entry>
|
|
Valide une valeur en tant qu'URL, optionnellement avec les composants
|
|
requis.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_EMAIL</constant></entry>
|
|
<entry>"validate_email"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>Valide une valeur en tant qu'email.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_VALIDATE_IP</constant></entry>
|
|
<entry>"validate_ip"</entry>
|
|
<entry></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>
|
|
</entry>
|
|
<entry>
|
|
Valide une valeur en tant qu'adresse IP, optionnellement, uniquement
|
|
IPv4 ou IPv6 ou non privé ou depuis un intervalle réservé.
|
|
</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_STRING</constant></entry>
|
|
<entry>"string"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>,
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_AMP</constant>
|
|
</entry>
|
|
<entry>
|
|
Supprime les balises, optionnellement, supprime ou encode
|
|
les caractères spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry>
|
|
<entry>"stripped"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>Alias du filtre "string".</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_ENCODED</constant></entry>
|
|
<entry>"encoded"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
|
|
</entry>
|
|
<entry>
|
|
Chaîne URL encodé, optionnellement, supprime ou encode
|
|
les caractères spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry>
|
|
<entry>"special_chars"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>
|
|
</entry>
|
|
<entry>
|
|
Échappe les caractères HTML <literal>'"<>&</literal>
|
|
ainsi que les caractères dont les valeurs ASCII sont inférieures
|
|
à 32, optionnellement, supprime ou encore les autres caractères
|
|
spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_UNSAFE_RAW</constant></entry>
|
|
<entry>"unsafe_raw"</entry>
|
|
<entry></entry>
|
|
<entry>
|
|
<constant>FILTER_FLAG_STRIP_LOW</constant>,
|
|
<constant>FILTER_FLAG_STRIP_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_LOW</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_HIGH</constant>,
|
|
<constant>FILTER_FLAG_ENCODE_AMP</constant>
|
|
</entry>
|
|
<entry>
|
|
Ne fait rien, optionnellement, supprime ou encode les caractères
|
|
spéciaux.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_EMAIL</constant></entry>
|
|
<entry>"email"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères, sauf les lettres, les chiffres et
|
|
<literal>!#$%&'*+-/=?^_`{|}~@.[]</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_URL</constant></entry>
|
|
<entry>"url"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères, sauf les lettres, les chiffres et
|
|
<literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry>
|
|
<entry>"number_int"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Supprime tous les caractères, sauf les chiffres ainsi que
|
|
les signes <literal>+-</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry>
|
|
<entry>"number_float"</entry>
|
|
<entry></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,
|
|
optionnellement, <literal>.,eE</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry>
|
|
<entry>"magic_quotes"</entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
<entry>Applique la fonction <function>addslashes</function>.</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry><constant>FILTER_CALLBACK</constant></entry>
|
|
<entry>"callback"</entry>
|
|
<entry>Fonction ou méthode de rappel, type <type>callback</type></entry>
|
|
<entry></entry>
|
|
<entry>
|
|
Appel d'une fonction utilisateur pour filtrer les données.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</preface>
|
|
|
|
&reference.filter.setup;
|
|
&reference.filter.constants;
|
|
&reference.filter.reference;
|
|
|
|
</book>
|
|
|
|
<!-- 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:"../../../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
|
|
--> |