VPR_Schnittstelle/Controller/InhaltsstoffController.php

38 lines
715 B
PHP
Raw Normal View History

<?php
2023-12-18 08:45:12 +01:00
//Programmiert von: Max Heer, Getestet von:
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);
}
2023-12-18 08:45:12 +01:00
public function insertInhaltsstoff($data)
{
$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
}
?>