namespace de fait hehe

This commit is contained in:
Yasder5 2026-02-28 15:57:54 +01:00
parent 6c21a5f1cb
commit 0638834933
23 changed files with 131 additions and 81 deletions

View file

@ -1,29 +0,0 @@
<?php
/**
* Classe d'un Mere de tout objet
* @author Yass & Laura
*/
class Entity{
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;
}
}