4 if (!defined("_ECRIRE_INC_VERSION")) return;
7 * Fonction de base de l'API de normalisation.
8 * (En cours de dev... sera peut etre a revoir)
11 function inc_normaliser_dist($valeur, $type, $options=null){
13 // On vérifie que les options sont bien un tableau
14 if (!is_array($options))
19 // On cherche si une fonction correspond au type existant
20 if ($normaliser = charger_fonction($type, 'normaliser', true)) {
21 $valeur_normalisee = $normaliser($valeur, $options, $erreur);
26 'valeur' => $valeur_normalisee,
27 'changement' => !$erreur and ($valeur_normalisee != $valeur)