2023-12-06 09:26:20 +01:00
|
|
|
<?php
|
2023-12-18 08:45:12 +01:00
|
|
|
//Programmiert von: Max Heer, Getestet von:
|
2023-12-06 09:26:20 +01:00
|
|
|
|
2023-12-18 08:45:12 +01:00
|
|
|
namespace ppb\Controller;
|
2023-12-06 09:26:20 +01:00
|
|
|
|
2023-12-18 08:45:12 +01:00
|
|
|
use ppb\Libary\Msg;
|
|
|
|
use ppb\Model\InhaltsstoffModel;
|
2023-12-06 09:26:20 +01:00
|
|
|
|
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();
|
2023-12-18 08:22:45 +01:00
|
|
|
return json_encode($result);
|
|
|
|
}
|
|
|
|
|
2023-12-18 08:45:12 +01:00
|
|
|
public function insertInhaltsstoff($data)
|
|
|
|
{
|
|
|
|
$result = $this->db->insertInhaltsstoff($data);
|
2023-12-18 08:22:45 +01:00
|
|
|
return json_encode($result);
|
|
|
|
}
|
|
|
|
|
2023-12-18 08:45:12 +01:00
|
|
|
public function deleteInhaltsstoff($id)
|
|
|
|
{
|
|
|
|
$result = $this->db->deleteInhaltsstoff($id);
|
2023-12-18 08:22:45 +01:00
|
|
|
return json_encode($result);
|
|
|
|
}
|
2023-12-18 08:45:12 +01:00
|
|
|
}
|
2023-12-06 09:26:20 +01:00
|
|
|
?>
|