|
|
@ -10,7 +10,7 @@ require_once "config/config.php";
|
|
|
|
class FluxModel
|
|
|
|
class FluxModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public function FindAllFlux(){
|
|
|
|
public function FindAllFlux(){
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$data = array();
|
|
|
|
$data = array();
|
|
|
|
$result = $gateway->findAllFlux();
|
|
|
|
$result = $gateway->findAllFlux();
|
|
|
|
|
|
|
|
|
|
|
@ -21,7 +21,7 @@ class FluxModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function addFlux(Flux $flux){
|
|
|
|
public function addFlux(Flux $flux){
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$data = $this->findFlux($flux);
|
|
|
|
$data = $this->findFlux($flux);
|
|
|
|
if ($data == array()) {
|
|
|
|
if ($data == array()) {
|
|
|
|
$gateway->addFlux($flux);
|
|
|
|
$gateway->addFlux($flux);
|
|
|
@ -29,26 +29,26 @@ class FluxModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function addFluxBySrc(string $flux): Flux {
|
|
|
|
public function addFluxBySrc(string $flux): Flux {
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$newFlux = new Flux($flux);
|
|
|
|
$newFlux = new Flux($flux);
|
|
|
|
$gateway->addFlux($newFlux);
|
|
|
|
$gateway->addFlux($newFlux);
|
|
|
|
return $newFlux;
|
|
|
|
return $newFlux;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function removeFlux(Flux $flux){
|
|
|
|
public function removeFlux(Flux $flux){
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway->removeFlux($flux);
|
|
|
|
$gateway->removeFlux($flux);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function removeFluxBySrc(string $flux): Flux {
|
|
|
|
public function removeFluxBySrc(string $flux): Flux {
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$newFlux = new Flux($flux);
|
|
|
|
$newFlux = new Flux($flux);
|
|
|
|
$gateway->removeFlux($newFlux);
|
|
|
|
$gateway->removeFlux($newFlux);
|
|
|
|
return $newFlux;
|
|
|
|
return $newFlux;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function findFlux(Flux $flux){
|
|
|
|
public function findFlux(Flux $flux){
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$data = array();
|
|
|
|
$data = array();
|
|
|
|
$result = $gateway->findFlux($flux);
|
|
|
|
$result = $gateway->findFlux($flux);
|
|
|
|
|
|
|
|
|
|
|
@ -59,7 +59,7 @@ class FluxModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function findFluxBySrc(string $flux){
|
|
|
|
public function findFluxBySrc(string $flux){
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local ; dbname= dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$gateway = new FluxGateway(new Connection('mysql:host= londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp'));
|
|
|
|
$data = array();
|
|
|
|
$data = array();
|
|
|
|
$result = $gateway->findFluxBySrc($flux);
|
|
|
|
$result = $gateway->findFluxBySrc($flux);
|
|
|
|
|
|
|
|
|