VPR_Schnittstelle/Controller/InhaltsstoffController.php

38 lines
726 B
PHP
Raw Permalink Normal View History

<?php
//Programmiert von: Max Heer, Getestet von: Samuel Wolff
2023-12-18 08:45:12 +01:00
namespace ppb\Controller;
2023-12-18 08:45:12 +01:00
use ppb\Libary\Msg;
use ppb\Model\InhaltsstoffModel;
2023-12-18 08:45:12 +01:00
class InhaltsstoffController
{
private $db;
public function __construct()
{
$this->db = new InhaltsstoffModel();
}
public function getInhaltsstoff()
{
$result = $this->db->getInhaltsstoff();
return json_encode($result);
}
2024-01-14 17:51:11 +01:00
public function writeInhaltsstoff($data)
2023-12-18 08:45:12 +01:00
{
$result = $this->db->insertInhaltsstoff($data);
return json_encode($result);
}
2023-12-18 08:45:12 +01:00
public function deleteInhaltsstoff($id)
{
$result = $this->db->deleteInhaltsstoff($id);
return json_encode($result);
}
2023-12-18 08:45:12 +01:00
}
?>