Copie propre du code final de Folliow (projet d'équipe DWWM)

This commit is contained in:
Yasser Boulayoune 2026-03-06 18:00:00 +01:00
commit eed64cfeb6
67 changed files with 17897 additions and 0 deletions

31
entities/Mother.php Normal file
View file

@ -0,0 +1,31 @@
<?php
namespace Entities;
/**
* Classe d'un Mere de tout objet
* @author Yass & Laura
*/
class Mother{
protected string $_prefix = '';
public function hydrate(array $arrData){
foreach($arrData as $key=>$value){
$strMethodName = "set".ucfirst(str_replace($this->_prefix,'',$key));
if (method_exists($this,$strMethodName)){
$this->$strMethodName($value);
}
}
}
protected function nettoyer(string $strText){
$strText = trim($strText);
$strText = str_replace("<script>", "", $strText);
$strText = str_replace("</script>", "", $strText);
return $strText;
}
}