|
|
|
@ -14,7 +14,7 @@ class FluxModel
|
|
|
|
|
$result = $gateway->findAllFlux();
|
|
|
|
|
|
|
|
|
|
foreach ($result as $row){
|
|
|
|
|
$data[] = new Flux($row['$flux']);
|
|
|
|
|
$data[] = new Flux((int)$row['id'],$row['$flux']);
|
|
|
|
|
}
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
@ -39,11 +39,9 @@ class FluxModel
|
|
|
|
|
$gateway->removeFlux($flux);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function removeFluxBySrc(string $flux): Flux {
|
|
|
|
|
public function removeFluxBySrc(string $flux) {
|
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host=londres.uca.local;dbname=dbrorossetto','rorossetto','tpphp'));
|
|
|
|
|
$newFlux = new Flux($flux);
|
|
|
|
|
$gateway->removeFlux($newFlux);
|
|
|
|
|
return $newFlux;
|
|
|
|
|
$gateway->removeFlux($flux);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findFlux(Flux $flux){
|
|
|
|
@ -52,7 +50,7 @@ class FluxModel
|
|
|
|
|
$result = $gateway->findFlux($flux);
|
|
|
|
|
|
|
|
|
|
foreach ($result as $row){
|
|
|
|
|
$data[] = new Flux($row['$flux']);
|
|
|
|
|
$data[] = new Flux($row['$flux'],(int)$row['id']);
|
|
|
|
|
}
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
@ -62,7 +60,7 @@ class FluxModel
|
|
|
|
|
$result = $gateway->findFluxBySrc($flux);
|
|
|
|
|
|
|
|
|
|
foreach ($result as $row){
|
|
|
|
|
$data[] = new Flux($row['$flux']);
|
|
|
|
|
$data[] = new Flux($row['$flux'],(int)$row['id']);
|
|
|
|
|
}
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|