|
|
@ -2,9 +2,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace model;
|
|
|
|
namespace model;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use DAL\FluxGateway;
|
|
|
|
|
|
|
|
use metier\Flux;
|
|
|
|
|
|
|
|
|
|
|
|
class FluxModel
|
|
|
|
class FluxModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private FluxGateway $gateway;
|
|
|
|
private FluxGateway $gateway;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct(FluxGateway $fluxGateway){
|
|
|
|
|
|
|
|
$this->gateway = $fluxGateway;
|
|
|
|
|
|
|
|
}
|
|
|
|
public function FindAllFlux(){
|
|
|
|
public function FindAllFlux(){
|
|
|
|
$data = array();
|
|
|
|
$data = array();
|
|
|
|
$result = $this->gateway->findAllFlux();
|
|
|
|
$result = $this->gateway->findAllFlux();
|
|
|
@ -17,7 +24,7 @@ class FluxModel
|
|
|
|
|
|
|
|
|
|
|
|
public function addFlux(Flux $flux)
|
|
|
|
public function addFlux(Flux $flux)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$data = findFlux($flux);
|
|
|
|
$data = $this->findFlux($flux);
|
|
|
|
if ($data == array()) {
|
|
|
|
if ($data == array()) {
|
|
|
|
$this->gateway->addFlux($flux);
|
|
|
|
$this->gateway->addFlux($flux);
|
|
|
|
}
|
|
|
|
}
|
|
|
|