/** * Edite le nom d'un organisme * @return bool $state * @param int $id_fundation * @param String $name_fundation */ public function editFundationName($id_fundation, $name) { if ($this->User->isRespFundations() != 1) { return 400; } $Fundation = new Fundation($id_fundation); $Fundation->setName(html_entity_decode($name)); return $Fundation->getState(); }
<?php set_include_path(dirname(_FILE_) . '/../'); require_once 'class/Fundation.class.php'; //$Fundation = new Fundation(0, 'BDE UTT'); //echo '<h2>Création</h2>'; //echo $Fundation->getName(); $Fundation = new Fundation(4); echo '<h2>Id</h2>'; echo $Fundation->getId(); echo '<h2>Nom</h2>'; echo $Fundation->getName(); echo '<h2>Etat</h2>'; echo $Fundation->getState(); echo '<h2>Changer le nom</h2>'; echo $Fundation->setName('BDE UTT 2'); echo '<h2>Nom</h2>'; echo $Fundation->getName(); echo '<h2>Removed</h2>'; echo $Fundation->remove();