Restructuration du git et ajout de la fonctionnalité de création de portfolio
This commit is contained in:
parent
dfaaedbda8
commit
3c80c52529
43 changed files with 1818 additions and 0 deletions
30
app/entities/mother_entity.php
Normal file
30
app/entities/mother_entity.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Classe d'une Mere de tout objet
|
||||
* @author Yass
|
||||
*/
|
||||
|
||||
class Entity{
|
||||
|
||||
protected string $_prefix = '';
|
||||
|
||||
|
||||
public function hydrate(array $arrData){
|
||||
foreach($arrData as $key=>$value){
|
||||
$strMethodName = "set".ucfirst(str_replace($this->_prefix,'',$key));
|
||||
var_dump($strMethodName);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue