/** * donne les points utilisables par une fundation pour faire sa tambouille * @return String $csvGroups */ public function getAvailablePoints() { $rtn = new ComplexData(); $req = $this->db->query("SELECT poi_id, poi_name FROM t_point_poi WHERE poi_removed = '0';"); while ($don = $this->db->fetchArray($req)) { $poi = new Point($don['poi_id']); $rtn->addLine(array($don['poi_id'], $poi->getName())); } return $rtn->csvArrays(); }
/** * Récupérer le nom d'un point. * * @param int $poi_id * @return String $name */ public function getPointName($poi_id) { $Point = new Point($poi_id); if ($Point->getState() == 1) { return $Point->getName(); } else { return $state; } }
<?php set_include_path(dirname(_FILE_) . '/../'); require_once 'class/Point.class.php'; require_once 'class/Object.class.php'; //$newPoint = new Point(0, 'Foyer'); //echo $newPoint->getName(); $Point = new Point(2); echo '<h2>Id</h2>'; echo $Point->getId(); echo '<h2>Nom</h2>'; echo $Point->getName(); echo '<h2>Etat</h2>'; echo $Point->getState(); //echo '<h2>Changer le nom</h2>'; //echo $Point->setName('Foyer2'); //echo '<h2>Nom</h2>'; //echo $Point->getName(); //echo '<h2>Removed</h2>'; //echo $Point->remove(); echo $Point->addObject(new Object(1)); echo $Point->addObject(new Object(2)); echo $Point->addObject(new Object(3)); echo $Point->addObject(new Object(4));