con = $con; } public function addFlux($flux){ $query = 'INSERT INTO Flux VALUES (:flux);'; $this->con->executeQuery($query, array(':flux' => array($flux->getFlux(), PDO::PARAM_STR))); } public function removeFlux($flux){ $query = 'DELETE FROM Flux WHERE flux = :flux;'; $this->con->executeQuery($query, array(':flux' => array($flux->getFlux(), PDO::PARAM_STR))); } public function findAllFlux(){ $query = 'SELECT * FROM Flux;'; $this->con->executeQuery($query); return $this->con->getResults(); } public function findFlux(Flux $flux){ return $this->findFluxBySrc($flux->getFlux()); } public function findFluxBySrc(string $flux){ $query = 'SELECT * FROM Flux WHERE flux = :flux;'; $this->con->executeQuery($query, array(':flux' => array($flux, PDO::PARAM_STR))); return $this->con->getResults(); } }