Commit 80f41192 authored by surville's avatar surville
Browse files

[Evolution] Ajout des attributs : supannEtuInscription, ucbnSiteLocalisation,...

[Evolution] Ajout des attributs : supannEtuInscription, ucbnSiteLocalisation, ucbnAnneePostBac, ucbnPrivateAddress, ucbnPrivateAddresseBis, supannEtuTypeDiplome + pas mal de corrections
parent f7a511b6
This diff is collapsed.
......@@ -76,7 +76,7 @@ abstract class Entity
/**
* Liste des patterns génériques utilisés pour différents attributs
*/
static protected $attribute_with_label_pattern = '/^\{(?<etiquette>[\w\-:]+)\}(?<identifiant>.+)$/';
static protected $attribute_with_label_pattern = '/^(?<etiquette>\{[\w\-:]+\})(?<identifiant>.+)$/';
/**
* Liste des patterns spécifiques utilisés pour différents attributs
......@@ -493,7 +493,7 @@ abstract class Entity
return null;
}
$num = preg_replace('/\s+/', '', $num);
$num = preg_replace('/[\.\-\s]+/', '', $num);
return preg_match("/0\d{9}/", $num)
? preg_replace("/0(\d{1})(\d{2})(\d{2})(\d{2})(\d{2})/", "+33 $1 $2 $3 $4 $5", $num)
......@@ -545,7 +545,7 @@ abstract class Entity
$value = [$value];
}
$value = array_filter($value);
$value = array_filter($value, 'strlen'); // Delete NULL, '' and FALSE values
return $value;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment